Skip to Content
0
Former Member
Feb 25, 2009 at 04:10 PM

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

413 Views

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.