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: 

pass value from one tcode to another

Former Member
0 Kudos

Hi ,

can anyone tell me how to pass a value(say customer) from one tcode(CIC0) to another tcode VA05 tcode.

could you please tell me at the earlist.

Regards

Raj.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Use SUBMIT <NAME> ....

Get F1 help on submit keyword , you will get the answer here

There are many ways in which you can call a program using the SUBMIT statement, you can pass parameters to it using WITH syntax, you can use a selection-table to pass parameters. Here is a sample of both. These pieces of code call MB51 program passing a material and todays data to the selection screen and the executing the report.

data: seltab type table of rsparams,

seltab_wa like line of seltab.

move: 'MATNR' to seltab_wa-selname,

'S' to seltab_wa-kind,

'I' to seltab_wa-sign,

'EQ' to seltab_wa-option,

'40000000' to seltab_wa-low.

append seltab_wa to seltab.

move: 'BUDAT' to seltab_wa-selname,

'S' to seltab_wa-kind,

'I' to seltab_wa-sign,

'EQ' to seltab_wa-option,

sy-datum to seltab_wa-low.

append seltab_wa to seltab.

submit rm07docs

with selection-table seltab

and return.

This next peice is a slightly different way of doing the same thing.

tables: mseg, mkpf.

ranges: r_matnr for mseg-matnr,

r_budat for mkpf-budat.

r_matnr-sign = 'I'.

r_matnr-option = 'EQ'.

r_matnr-low = '40000000'.

append r_matnr.

r_budat-sign = 'I'.

r_budat-option = 'EQ'.

r_budat-low = sy-datum.

append r_budat.

submit rm07docs

with matnr in r_matnr

with budat in r_budat

and return.

Please give me reward point If it is useful

Thanks

Murali Poli

2 REPLIES 2

Former Member
0 Kudos

Use SUBMIT <NAME> ....

Get F1 help on submit keyword , you will get the answer here

There are many ways in which you can call a program using the SUBMIT statement, you can pass parameters to it using WITH syntax, you can use a selection-table to pass parameters. Here is a sample of both. These pieces of code call MB51 program passing a material and todays data to the selection screen and the executing the report.

data: seltab type table of rsparams,

seltab_wa like line of seltab.

move: 'MATNR' to seltab_wa-selname,

'S' to seltab_wa-kind,

'I' to seltab_wa-sign,

'EQ' to seltab_wa-option,

'40000000' to seltab_wa-low.

append seltab_wa to seltab.

move: 'BUDAT' to seltab_wa-selname,

'S' to seltab_wa-kind,

'I' to seltab_wa-sign,

'EQ' to seltab_wa-option,

sy-datum to seltab_wa-low.

append seltab_wa to seltab.

submit rm07docs

with selection-table seltab

and return.

This next peice is a slightly different way of doing the same thing.

tables: mseg, mkpf.

ranges: r_matnr for mseg-matnr,

r_budat for mkpf-budat.

r_matnr-sign = 'I'.

r_matnr-option = 'EQ'.

r_matnr-low = '40000000'.

append r_matnr.

r_budat-sign = 'I'.

r_budat-option = 'EQ'.

r_budat-low = sy-datum.

append r_budat.

submit rm07docs

with matnr in r_matnr

with budat in r_budat

and return.

Please give me reward point If it is useful

Thanks

Murali Poli

0 Kudos

Hi Thanks for your respose.

But here the user is entering the customer in CIC0 tcode.

Regards

raj.

Message was edited by:

raj abap