Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

upload

former_member329386
Participant
0 Likes
719

Hi all

How to upload ME11 using BDC. it will be helpfull if any one can send steps of recording & code.

Thanks

5 REPLIES 5
Read only

Former Member
0 Likes
666

Hi,

Here is the program for the BDC Recording for ME11

report ZTEST_ME11
       no standard page heading line-size 255.

include bdcrecx1.

parameters: dataset(132) lower case.
***    DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
*
*   If it is nessesary to change the data section use the rules:
*   1.) Each definition of a field exists of two lines
*   2.) The first line shows exactly the comment
*       '* data element: ' followed with the data element
*       which describes the field.
*       If you don't have a data element use the
*       comment without a data element name
*   3.) The second line shows the fieldname of the
*       structure, the fieldname must consist of
*       a fieldname and optional the character '_' and
*       three numbers and the field length in brackets
*   4.) Each field must be type C.
*
*** Generated data section with specific formatting - DO NOT CHANGE  ***
data: begin of record,
* data element: ELIFN
        LIFNR_001(010),
* data element: INFNR
        INFNR_002(010),
* data element: NORMB
        NORMB_003(001),
* data element: EINATX
        TXZ01_004(040),
* data element: MATKL
        MATKL_005(009),
* data element: ULAND
        URZLA_006(003),
* data element: TELF0
        TELF1_007(016),
* data element: BSTME
        MEINS_008(003),
* data element: SORTI
        SORTL_009(010),
* data element: LTEXT
        LTEX1_01_010(040),
      end of record.

*** End generated data section ***

start-of-selection.

perform open_dataset using dataset.
perform open_group.

do.

read dataset dataset into record.
if sy-subrc <> 0. exit. endif.

perform bdc_dynpro      using 'SAPMM06I' '0100'.
perform bdc_field       using 'BDC_CURSOR'
                              'EINA-LIFNR'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'EINA-LIFNR'
                              record-LIFNR_001.
perform bdc_field       using 'EINA-INFNR'
                              record-INFNR_002.
perform bdc_field       using 'RM06I-NORMB'
                              record-NORMB_003.
perform bdc_dynpro      using 'SAPMM06I' '0101'.
perform bdc_field       using 'BDC_CURSOR'
                              'EINA-SORTL'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'EINA-TXZ01'
                              record-TXZ01_004.
perform bdc_field       using 'EINA-MATKL'
                              record-MATKL_005.
perform bdc_field       using 'EINA-URZLA'
                              record-URZLA_006.
perform bdc_field       using 'EINA-TELF1'
                              record-TELF1_007.
perform bdc_field       using 'EINA-MEINS'
                              record-MEINS_008.
perform bdc_field       using 'EINA-SORTL'
                              record-SORTL_009.
perform bdc_dynpro      using 'SAPMM06I' '0103'.
perform bdc_field       using 'BDC_CURSOR'
                              'RM06I-LTEX1(01)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=BU'.
perform bdc_field       using 'RM06I-LTEX1(01)'
                              record-LTEX1_01_010.
perform bdc_transaction using 'ME11'.

enddo.

perform close_group.
perform close_dataset using dataset.

Read only

0 Likes
666

User ID deleted for answering lazy questions...

Read only

0 Likes
666

What about people asking them ?

Read only

0 Likes
666

Our arsenal consists of: Eggs, tomatoes, delete button, cream pies...

Enjoy the weekend,

Julius

Read only

former_member329386
Participant
0 Likes
666

Answered