‎2009 Feb 25 4:10 PM
Hi,
I have a requirement where I have to copy pf-status of one program in another based on ceratin configuration that user does.
Note: I know how to do it in se41, but thats not what I want.
I was debugging SAP code to see how SAP does that. I found that the if pf-status of one program is to be copied in another program, then a particualar perform " copy_status_diff_progs_new" in program "SAPLSMPE" is used.
So I tried to use trhe same in my code as follows. But it gives me ABAP dump.
constants: con_false value space.
data: t_prog like TRDIR-NAME,
s_prog like TRDIR-NAME,
t_status like RSMPE-STATUS,
s_status like RSMPE-STATUS.
data: rcode type rcode.
s_prog = 'ZCUST1'.
s_status = 'REALINDEX'.
t_prog = 'ZCUST2'.
t_status = 'REALINDEX1'.
perform copy_status_diff_progs_new in program SAPLSMPE
using con_false
s_prog t_prog
s_status t_status
rcode.Can someone tell if there is any function module or how can I modify above code so that pf-status can be copied programatically in my custom code.?
Regards,
Jainam.
‎2009 Feb 25 4:40 PM
Goto>Se41>In program name type--->Zcust1
Click on User interface mention Zcust2 in the to program.
And copy it.
Note: Activate the user interface.
Or
Use BDC to simulate the above functionality .
Regards,
Gurpreet
‎2009 Feb 25 4:20 PM
Actually the perform 'copy_status_diff_progs_new' that I am trying to call is in the Include 'LSMPEF07' of program 'SAPLSMPE'.
Please help......
‎2009 Feb 25 4:24 PM
Use:
Set PF-Status '<Name>' of Program '<ProgName>'.Hope this resolve your issue.
Regards,
Gurpreet
‎2009 Feb 25 4:32 PM
Thanks Gurpreeet for your reply. The pf-status that I want to set is for selection screen not a dialog program. So I have to set it at initilaization. I am doing as follows.
Report ZCUST2.
Initialization.
set pf-status 'GUINDEX' OF PROGRAM 'ZCUST1'.
But I get an error saying that user interface does note xist for ZCUST2.
Regards,
Jainam.
‎2009 Feb 25 4:36 PM
Sorry, bad answer
Edited by: Gustavo Campanelli on Feb 25, 2009 2:37 PM
‎2009 Feb 25 4:40 PM
Goto>Se41>In program name type--->Zcust1
Click on User interface mention Zcust2 in the to program.
And copy it.
Note: Activate the user interface.
Or
Use BDC to simulate the above functionality .
Regards,
Gurpreet