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

Problem while copying standard program to Z Program

Former Member
0 Likes
3,196

Hi SAP Forum,

I have copied one standard program to Zprg. and there are TWO Screens in standard program (100, 200). But in my Zprg only 200 copied, when I'm trying to copy Screen 100, it shows an error, "Screen already exists"..

And also, I've created one "Z" Transaction Code for my same program. In that, I've mention, Screen Number: 100.. When I execute "Z" Transaction, the Screen 100, will come as selection cretria is on that, and when I click on Execute Button, it comes back in SAP EASY ACCESS Screen (Initial Screen). But I want that, Screen 200 will come when I click on execute Button in Screen 100.

How can I resolve this?

Thanks

Devinder

11 REPLIES 11
Read only

Former Member
0 Likes
2,125

check on the includes on the main program after copying only the name changes but code does not get changed.

so maybe your program still has the standard includes.

Read only

0 Likes
2,125

Hi,

I have already modified all the related names in the code to "Z". But the problem is still there.

If anybody knows about the whole process of copying a program with screens, includes etc. then just do let me know?

Thanks

Devinder

Read only

0 Likes
2,125

go to se80 check on the program if it has the screen attached to it,

or the best other way i can figure out is to check by debugging since you said one of the screens are working so there might be a problem @ the code of execution

Read only

0 Likes
2,125

hi,

I hope you have copied the program from SE80 or SE38 using the COPY option.

Inside the standard program you will have many includes. Although you renbame the includes during Copy, they wont be created in the Program with new name. So inside your program rename the includes as Z includes. Also open each standard include in SE38 and copy them to the same X include name you have used for them in your program.

Also, change the screen number in your custom program to 101 and 201. Do a FIND and change it.

ags.

Read only

0 Likes
2,125

Hi,

I'm getting the error given below, while activating the copied program.

Pls help if anybody konws.

Generation errors in program

-


Source code ???????????????????????????????????????? Line 0

Error when generating the selection screen "0100" of report "ZRVBBWULS

".

Thanks

Devinder

Read only

0 Likes
2,125

hi,

look for this code:


  IF NOT ( sy-tcode = 'MB56' ).
    MESSAGE e213(12).
  ENDIF.

change the name of the TCODE to your custom TCODE.

This is causing the Error.

ALSO,

While copying the PRogram, DO NOT change the name of the INCLDUE to ZINCLUDE. Keep the same name. No issues.

Let me know if its woring>?

ags

Read only

0 Likes
2,125

I Guess you need to create the screen 100 for your program..

If its already created check out wether its activated or not..

Go to se51 and try creating the screen, or if there is a call screen you are using in you code then double click on that it has to navigate you to that screen if it is existing.

Read only

0 Likes
2,125

Hi ags,

Thanks.. I've already changed the TCODE from code and second thing about Include, I've also changed the name of BOTH (two Includes) and it is working fine.. but error still coming...

Generation errors in program

-


Source code ???????????????????????????????????????? Line 0

Error when generating the selection screen "0100" of report "ZRVBBWULS

".

and also, I've done only one change in Include, I've added one select-options over there and getting the same error, but if I add PARAMETERS, then its executed successfully. But I want add a "Posting Date" as SELECT-OPTIONS.

Pls try to resolve this..

Thanks a lot in advance

Devinder

Edited by: Devinder Pawha on May 13, 2010 2:02 PM

Read only

0 Likes
2,125

Hi Devinder Pawha,

I faced the same problem. This problem is because of the following.

The report MB56 has 2 screen 100 & 200. While copying the program RVBBWULS from SE80, every thing except screen 100 will be copied. This is because screen 100 is a selection screen. When we try to copy this screen explicitly using SE51, it will be copied as Normal screen. And hence system gives the error "Error when generating the selection screen "0100" of report "ZRVBBWULS" while activating the program ZRVBBWULS.

Remedy: Dont copy the screen 100, system will generate a default screen with number 100.

2. While creating the tcode ZMB56 for this report, we might have selected the first option. "Program and screen (dialog transaction)". Hence system will display the selection screen, but while executing, it returns to the SAP easy access screen.

Remedy: We must select the second option "Program and selection screen (report transaction)".

Read only

agnihotro_sinha2
Active Contributor
0 Likes
2,125

open the program form SE80, and look for the SCREENs. Isnt there 100 and 200 both?

For REPORTs the Selection screen standard should always have number 1000. You cannot edit this screen as this is overwritten whenevr REPORT is called.

Read only

dharmesh_kumar
Explorer
0 Likes
2,125

Follow these step :

1. Copy MB56 (with includes) as normal.

2. Create transaction (program and transaction screen not program and screen)

3. Go to SE80 and activate the program by selecting top tree node.

4. Right click on top node and select other functions > rebuild object list

5. You will notice screen 100 got generated.

6. Change transaction type to program and screen (dialogue) and put 0100 as selection screen.

Note: you have to make few more changes inside copied MB56 program to make it work.

Regards

Dharmesh Kumar