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: 

passing value from one program to another

Former Member
0 Kudos
2,510

Dear All,

I have to pass one value from one program to the standard selection screen .But there is no paramter id .how can i pass the value.

Regards,

Magesh

7 REPLIES 7

Former Member
0 Kudos
427

Hi,

There are 3 options through which u can pass the value from 1 prog to another.

Methods:

1. SET / GET parameter.

2. Submit program via selection screen.

3. Import / Export command.

I think in ur case u can use Submit program.

Kind Regards.

Former Member
0 Kudos
427

Hi,

create the parameter ID in the program in which u want ot fetch the value.

Get parameter ID into w_int.

write the statement in the program in which u want to retrieve the value.

and then assign the variable to the selection screen element in the initialization event.

initialization.

p_para = w_int.

I hope it will help u.

Former Member
0 Kudos
427

Hi

Use the export statemnt using a 3 digit memory id to pass value to another program. The receiving program should use the import statemnt with this memory id.

Thanks

Vijay

Former Member
0 Kudos
427

Hi Magesh,

See the help for these

- EXPORT obj1 ... objn TO DATA BUFFER f.

- EXPORT obj1 ... objn TO MEMORY.

- EXPORT (itab) TO ... .

- IMPORT obj1 ... objn FROM DATA BUFFER f.

- IMPORT obj1 ... objn FROM MEMORY.

- IMPORT (itab) FROM ... .

Important thing is that these work correct in same session only.

awrd points if useful

Bhupal

Former Member
0 Kudos
427

What is the exact requiremnt?

If it has to be a default value always

use function module exit in your program.

call the include, inside the FM hardcode the value.

or if it has to be only for a specific condition.

validate using the condtion.

-Pankaj

Former Member
0 Kudos
427

Hi

If you dont have PID then use BDC for the same using the T code and pass the value

Regards

Shiva

Former Member
0 Kudos
427

Hi,

If there is no parameter id, u can pass values using USING keyword via subroutine.

Check this out,.

In pgm1,

PERFORM read_data

IN PROGRAM pgm2 USING <structure/itab>.

Make sure that you have values in the structure.

Reward if helpful.

Regards,

Ramya

.