Application Development and Automation 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: 
Read only

Copying pf-status from one custom program to other programatically.....

Former Member
0 Likes
1,290

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
875

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

5 REPLIES 5
Read only

Former Member
0 Likes
875

Actually the perform 'copy_status_diff_progs_new' that I am trying to call is in the Include 'LSMPEF07' of program 'SAPLSMPE'.

Please help......

Read only

Former Member
0 Likes
875

Use:

Set PF-Status '<Name>' of Program '<ProgName>'.

Hope this resolve your issue.

Regards,

Gurpreet

Read only

0 Likes
875

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.

Read only

Former Member
0 Likes
875

Sorry, bad answer

Edited by: Gustavo Campanelli on Feb 25, 2009 2:37 PM

Read only

Former Member
0 Likes
876

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