03-10-2009 4:14 AM
Hi Guys,
I have developed program A and I am calling the program A in another program B.
Now I have to code in program A for two different behavior for the below two scenarios
1. When called by the program B or other programs
2. When it is directly executed. - via selection screen
Is there any System variables (I have checked all but none is suitable) or any other way.
Regards,
Prabhu
03-10-2009 4:19 AM
Hi,
I feel you can use 'MEMORY ID' for this. When you are calling the Program A from program B, before submitting use exprt to set the value in memory id. And check this value before executing the part of program which yo want to execute when it is called from another program.
Regards,
Ranjit Thakur.
03-10-2009 4:19 AM
Hi,
I feel you can use 'MEMORY ID' for this. When you are calling the Program A from program B, before submitting use exprt to set the value in memory id. And check this value before executing the part of program which yo want to execute when it is called from another program.
Regards,
Ranjit Thakur.
03-10-2009 4:19 AM
Hi
You can use flags . export the flags to memory when your submitting from B then import and check them in A .
03-10-2009 4:24 AM
Hi,
As you have create a program PROGRAM A which needs to be called in other programs say PROGRAM B. So to do so you can use code in PROGRAM B to call PROGRAM A:-
SUBMIT <program_a> WITH <parameter_name> = <parameter_value>
<parameter_name> = <parameter_value>
<parameter_name> = <parameter_value>
"and so on for all parameters in program a
AND RETURN. "use return if you wat to return control from program a back to program b
Hope this helps you.
Regards,
Tarun
03-10-2009 4:29 AM
Hi,
This can be done using SET/GET parameters. See while u are executing the program B and calling the Program A using the submit statement then just do as follows:
DATA: L_flg type c.
SUBMIT......
l_flg = 'X'.
SET PARAMETER ID 'FLG' FIELD l_flg. --> in the program B.
Now in program A..u can just do as follows:
DATA: L_flg type c.
GET PARAMETER ID 'FLG' FIELD l_flg.
now check for the value of l_flg..
IF l_flg IS NOT INITAIL.
This means it is called from the other program B
ENDIF.
And if l_flg is initial...it is directly executed.
Hope this will help u..
keerthi
03-10-2009 4:30 AM
Use syntax like.
export val into memory id '001'.
and Import val from memeory id '001'.
thankyou.
03-10-2009 5:35 AM