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

Call Transaction

Former Member
0 Likes
723

Good day All,

I want to run MB51 transaction code in program thru CALL TRANSACTION statement. How can I set more than one contents in field MATNR in selection screen. Actually requirement is that my program read matnr from text file and run MB51 transaction with read matnr.

Thanks

Syed Tayab Shah

1 ACCEPTED SOLUTION
Read only

ThomasZloch
Active Contributor
0 Likes
685

Hello,

behind transaction MB51 is executable program RM07DOCS. You might be able to use the SUBMIT statement for calling this program instead of call transaction, then you can transfer any selection of material numbers in parameter MATNR.

Greetings

Thomas

Good day All,

I want to run MB51 transaction code in program thru CALL TRANSACTION statement. How can I set more than one contents in field MATNR in selection screen. Actually requirement is that my program read matnr from text file and run MB51 transaction with read matnr.

Thanks

Syed Tayab Shah

4 REPLIES 4
Read only

Former Member
0 Likes
685

Hi,

You can use the concept ,

call transaction with bdc data..

see the sample code below..

DATA: BDCDATA TYPE TABLE OF BDCDATA.

DATA: ITAB TYPE TABLE OF BDCMSGCOLL.

DATA: PROGRAM LIKE SY-REPID,

WA_BDCDATA TYPE BDCDATA.

WA_BDCDATA-PROGRAM = 'SAPMS38M'.

WA_BDCDATA-DYNPRO = '0100'.

WA_BDCDATA-DYNBEGIN = 'X'.

APPEND WA_BDCDATA TO BDCDATA.

CLEAR WA_BDCDATA.

WA_BDCDATA-FNAM = 'RS38M-PROGRAMM'.

WA_BDCDATA-FVAL = PROGRAM.

APPEND WA_BDCDATA TO BDCDATA.

...

CALL TRANSACTION 'SE38' USING BDCDATA MODE 'N'

MESSAGES INTO ITAB.

Please make it according to your requirement...

Please reward points if useful.

Regards,

Renjith Michael.

Read only

0 Likes
685

Hi Michael,

Thanks for your response. but BDCDATA cant run tcode with multiple inputs.

Thanks

Syed Tayab Shah

Read only

ThomasZloch
Active Contributor
0 Likes
686

Hello,

behind transaction MB51 is executable program RM07DOCS. You might be able to use the SUBMIT statement for calling this program instead of call transaction, then you can transfer any selection of material numbers in parameter MATNR.

Greetings

Thomas

Read only

0 Likes
685

Good Day Mr. Zloch.

Thanks a lot to help and I have done it successfully. May GOD help and better progress in you future.

Thanks

Syed Tayab shah