2007 Jul 24 4:19 PM
I have called a program A from many programs say B and C.
In the the called program B, I have to find from which program it has been called either B or C?
Is there any systenm field or way to find out?
Why do you use SET PARAMETER ID with program name before call program C?. And after this you can get name with GET PARAMETER ID
2007 Jul 24 4:23 PM
Hi,
Please check ABAP system field SY-CPROG.
Regards,
Ferry Lianto
2007 Jul 24 4:25 PM
2007 Jul 24 4:30 PM
Check with :
SY-CALLD
X if the program was started using CALL TRANSACTION, CALL DIALOG, or SUBMIT [AND RETURN]. Space if the program was started using LEAVE TO TRANSACTION or using a transaction code from a screen. SY-CALLD is always space when a batch input session is being processed.
SY-CPROG
The name of the calling program in an external routine, otherwise the name of the current program.
I guess if want to have calling program then you need pass the program name expliciltly in perform routine
any way check with below link:
http://help.sap.com/saphelp_46c/helpdata/en/7b/fb96c8882811d295a90000e8353423/content.htm
To find out at runtime if a program is running as a called program, use the system variable sy-calld
Thanks
Seshu
Message was edited by:
Seshu Maramreddy
Message was edited by:
Seshu Maramreddy
2007 Jul 24 4:36 PM
Why do you use SET PARAMETER ID with program name before call program C?. And after this you can get name with GET PARAMETER ID
2007 Jul 24 4:37 PM
Why do you use SET PARAMETER ID with program name before call program C?. And after this you can get name with GET PARAMETER ID
2007 Jul 24 4:26 PM
Hi,
Please check SY-REPID and SY-CALLD.
If it doesn't work then perhaps you can use EXPORT/IMPORT TO/FROM MEMORY statement.
Regards,
Ferry Lianto
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |