Friday, May 27, 2011

How to get batch characterstics

Combine 18 character material and 10 character batch into OBJEK.
Now pass this OBJEK to table INOB.
pass KLART as '023' - batch
pass OBTAB as 'MCH1'
Now go to AUSP.
Pass the CUOBJ field from the INOB table to OBJEK field.
Here you will get all the characterstics value.
You can get your desired characterstics.
Below is the code for the same.


REPORT  zbatch_characterstics.

TYPES: BEGIN OF d_ausp,
       atinn TYPE ausp-atinn,
       atwrt TYPE ausp-atwrt,
      END OF d_ausp.

DATA: w_matnr TYPE mara-matnr,
      w_charg TYPE lips-charg,
      w_key   TYPE ausp-objek,
      w_cuobj TYPE inob-cuobj,
      w_vinin TYPE ausp-atinn.

DATA: it_ausp TYPE TABLE OF d_ausp.

DATA: wa_ausp TYPE d_ausp.

CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
  EXPORTING
    input        = w_matnr
  IMPORTING
    output       = w_matnr
  EXCEPTIONS
    length_error = 1
    OTHERS       = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

CALL FUNCTION 'CONVERSION_EXIT_AUFNR_INPUT'
  EXPORTING
    input  = w_charg
  IMPORTING
    output = w_charg.

CONCATENATE w_matnr w_charg INTO w_key.

SELECT SINGLE cuobj
  FROM inob
  INTO w_cuobj
  WHERE klart = '023'
  AND   obtab = 'MCH1'
  AND   objek = w_key.

SELECT atinn atwrt
  FROM ausp
  INTO TABLE it_ausp
  WHERE objek = w_cuobj.

SELECT SINGLE atinn
  INTO w_vinin
  FROM cabn
  WHERE atnam = 'VEHICLE_VIN'.

READ TABLE it_ausp INTO wa_ausp WITH KEY atinn = w_vinin.

** How to get material batch characterstics in sap

Friday, May 20, 2011

Removing Duplicates in Excel Using Advanced Filter


  • Select the entire table from where you want to remove duplicates.
  • Now sort the table with the column for which you want to compare for duplicate entries.
  • Select the entire table again and click on advanced filter.
  • Select radio button "Copy to another location".
  • List range will automatically populate according to your selection.
  • Place the cursor on the copy to; and select a cell where you want unique entries to come.
  • Now select the check box "Unique records only" and then press ok.

Friday, May 13, 2011

SE16 V/S SE16N

SE16: SE16 is a data browser and it is used to view the contents of the table and we cannot change or append new fields to the existing structure of the table as we cannot view the structure level display using the SE16.

SE16N: The transaction code SE16N (general table display) is an improved version of the old data browser (SE16).

** Once you have entered your table name, type "&SAP_EDIT" without the quotation marks into the transaction code. This enables editing functionality on SE16N and allows you to make table changes. This allows you to access both configuration and data tables which may be otherwise locked in a production environment.
***** Caution *****

Features of SE16N:
The new transaction has a number of advantages over SE16.
  • You no longer have a maximum of 40 fields to select in the output.
  • There are fewer steps involved in executing a number of functions, whether it be outputting the results, maintaining the values in a table etc.
  • Exporting the data into Excel is far easier and quicker.
  • ALV functionality is available as standard.
  • The user is not restricted by having a maximum width of 1023 saved as a default in the user settings.
  • You can directly edit custom table entries which are maintainable from SM30.
  • Enhanced and user friendly user interface and more options.
Difference between se16 and se16n

Wednesday, May 11, 2011

How to lock your PC using mouse

Its a general tendency to lock your computer/laptop using Alt+Ctrl+Del or Windows+L. Did you know that you can lock your system using mouse also. Follow steps and create shortcuts which can be used to lock your computer.

Right click on an empty spot on the desktop
Go  to ‘New’ and select ‘Shortcut’
In the ‘Create Shortcut’ dialog box, copy-paste the following under ‘Type the location’: "rundll32 user32.dll,LockWorkStation"
Click ‘Next’
In ‘Type a name for this shortcut’, give a name ‘Lock’ or a name your wish and click ‘Finish’

Now simple double click on the shortcut you created to lock your compute.