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

How to find function code for Dynamic generated program

Aditya
Participant
0 Likes
2,142

Hi,

I have created a dynamic program for getting different selection screens depending on inputs . I am finding a flaw that, pressing 'BACK' buttn is leading some other action which was coded by me,  instead of going back.

SY-UCOMM is also not working as it is dynamic program.

Help me for getting previous screen.

Please suggest me the inputs.Thank u

Regards

Aditya

1 ACCEPTED SOLUTION
Read only

Aditya
Participant
0 Likes
1,930

Hi all,

I tried with ABAP memory concept (Import and Export) by sharing memory.

It's working fine now.

Regards,
Aditya

12 REPLIES 12
Read only

Former Member
0 Likes
1,930

Hi Aditya,

If it is an all new dynamic program then when it's called there is a new LUW. Does the dynamic program processes the sy-ucomm or do you try to do it with the caller program?

regards,

Edgar

Read only

Former Member
0 Likes
1,930

Hi,

Can you please elaborate the issue.

Is it the issue with the selection screen which is dynamic.

Regards,

Swapna

Read only

0 Likes
1,930

Hi Swapna,

1. In my first selection screen, if I give 'VBAK', then in second screen I wil get 'VBELN' as select-options.

Parallely, If I give 'MARA' in the first screen, then in second screen I wil get 'MATNR' as select-options.

2. So, here , In second screen , if I press back(F3) then it is going for other code which was already coded by me ( eg:  downloading to flatfile).

3. My problem is , it need to go back to first screen whenever I press 'BACK' button.

     The second screen is dynamically coded using fieldsymbols. I also tried to pass static break-point to second screen , it is capturing 'ONLI(i.e F8)' but not 'BACK' function code.

Regards,

Aditya

Read only

Former Member
0 Likes
1,930

Hi,

can you check SSCRFIELDS-UCOMM instead of SY-UCOMM there?

TABLES: SSCRFIELDS.

code line is needed for that.

Regards,

Klaus

Read only

0 Likes
1,930

Hi Aditya,

     Can you please post your code.Then i can help you,Because recently i faced the same Problem.

     Change ucomm code for BACK.Once Try with 'BCAK' or any.I hope it will trigger the User command.It worked for me at that time.

Regards,

Dinesh

Read only

0 Likes
1,929

Hi Klaus,

As per ur instructions, I replaced SY-UCOMM with SSCRFIELDS.

But no change in my problem.

The following screen shot is a program which is coded dynamically using fieldsymbols.

When I press BACK here for the following code selectionscreen, I am getting someother action which was coded by me. But not going back.

Twist is, SSCRFIELDS-UCOMM or SY-UCOMM is getting captured for 'F8', but not 'BACK'.

I hope, I have explained my issue clearly. Please let me know, if any deep clarifications needed.

Regards,

Aditya

Read only

0 Likes
1,929

Hi Dinesh,

I tried by as per ur instructions. But no change in my issue.

Please find the code shot @ Klaus Babl

Read only

0 Likes
1,929

Hi Aditya,

You are still very vague. If that program is coded dynamically then where is pf-status 'ZDYN'?

I'll try to give an idea of what I think you are describing:

  1. you have a normal report with a selection screen.
  2. at event start-of-selection you generate a second report with it's selection screen using maybe the "insert report" instruction
    1. subsequently it generates the report and call it with submit
  3. user executes report, presses F8, second selection screen shows up and user presses "esc" to return to first selection screen
  4. program returns to event start-of-selection of first report after submit where you have, of course, no acess to sy-ucomm of second report.

Is it like this?

regards,

Edgar

Read only

0 Likes
1,929

Okay,

this is my suggestion based on my assumption.

You cannot get the "esc" ok_code in events at selection-screen or start-of-selection. It is an "at exit-command" event.

You could set a flag parameter id in start-of-selection of second program so you would know the second report was executed and not canceled.

If user returns to first program and this flag is not set then you know user pressed "esc" or a similar cancel ok_code was invoked.

Now in start-of-selection of first report you can cancel processing without outputting any result leaving user in first original screen.

regards,

Edgar

Read only

Former Member
0 Likes
1,929

Hi,

I think Klaus, is right you have to use SSCRFIELDS-UCOMM to catch the event..

Regards,

Siddhesh.

Read only

Former Member
0 Likes
1,929

Hi,

First Find the function code of the BACK button.

Goto SYSTEM -> STATUS and double click on GUI STATUS.

Read only

Aditya
Participant
0 Likes
1,931

Hi all,

I tried with ABAP memory concept (Import and Export) by sharing memory.

It's working fine now.

Regards,
Aditya