Application Development 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: 

standard program

Former Member
0 Kudos

hai everyone,

can anyone please tell the standard programs for uploading data using call transaction for mm and sd.

thanks in advance

gopan.

6 REPLIES 6

Former Member
0 Kudos

what do you mean call transaction mm sd ?

0 Kudos

yes ,

the standard program to upload material data using call transaction.

thanks in advance

0 Kudos

you should write your own program with bdc recording. populate the BDC data and write your own code.

report ZTES_MATUP
       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: MTART
        MTART_001(004),
* data element: MATNR
        MATNR_002(018),
* data element: XFELD
        KZSEL_01_003(001),
* data element: XFELD
        KZSEL_02_004(001),
* data element: MAKTX
        MAKTX_005(040),
* data element: MEINS
        MEINS_006(003),
* data element: SPART
        SPART_007(002),
* data element: MAKTX
        MAKTX_008(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 'SAPLMGMM' '0060'.
perform bdc_field       using 'BDC_CURSOR'
                              'RMMG1-AENNR'.
perform bdc_field       using 'BDC_OKCODE'
                              'AUSW'.
perform bdc_field       using 'RMMG1-MTART'
                              record-MTART_001.
perform bdc_field       using 'RMMG1-MATNR'
                              record-MATNR_002.
perform bdc_dynpro      using 'SAPLMGMM' '0070'.
perform bdc_field       using 'BDC_CURSOR'
                              'MSICHTAUSW-DYTXT(02)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=ENTR'.
perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                              record-KZSEL_01_003.
perform bdc_field       using 'MSICHTAUSW-KZSEL(02)'
                              record-KZSEL_02_004.
perform bdc_dynpro      using 'SAPLMGMM' '4004'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'MAKT-MAKTX'
                              record-MAKTX_005.
perform bdc_field       using 'BDC_CURSOR'
                              'MARA-SPART'.
perform bdc_field       using 'MARA-MEINS'
                              record-MEINS_006.
perform bdc_field       using 'MARA-SPART'
                              record-SPART_007.
perform bdc_dynpro      using 'SAPLMGMM' '4004'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'BDC_CURSOR'
                              'MAKT-MAKTX'.
perform bdc_field       using 'MAKT-MAKTX'
                              record-MAKTX_008.
perform bdc_dynpro      using 'SAPLSPO1' '0300'.
perform bdc_field       using 'BDC_OKCODE'
                              '=YES'.
perform bdc_transaction using 'MM01'.

enddo.

perform close_group.
perform close_dataset using dataset.

regards

vijay

former_member188685
Active Contributor
0 Kudos

hi,

for materal creation this is the direct input program <b>RMDATIND</b>

but in SD what do you want..

Regards

Vijay

0 Kudos

RMDATIND IS STANDARD PROGRAM FOR DIRECT INPUT METHOD

PLS TELL FOR CALL TRANSACTION

Former Member
0 Kudos

Hi Gopan,

if u want to use CALL TRANSACTION, method, u need to record the transaction using SHDB first, then generate a program for the recording n proceed as Vijay has suggested.

Hope it helps,

Regards,

Bikash