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

error too many consecutve nested call screens.

Former Member
0 Likes
2,650

pls have a look

wh m excuting this code it gives me error that no of nested screens called

&----


*& Module Pool ZASI_EXAMPLE19

*&

&----


*&

*&

&----


PROGRAM zasi_example19.

TABLES sflight.

DATA: BEGIN OF tab,

carrid TYPE sflight-carrid,

connid TYPE sflight-connid,

fldate TYPE sflight-fldate,

price TYPE sflight-price,

currency TYPE sflight-currency,

planetype TYPE sflight-planetype,

seatsmax TYPE sflight-seatsmax,

seatsocc TYPE sflight-seatsocc,

END OF tab.

DATA: ok TYPE c,

back TYPE c,

ok_code LIKE sy-ucomm.

&----


*& Module STATUS_0500 OUTPUT

&----


  • text

----


MODULE status_0500 OUTPUT.

CASE sy-ucomm .

WHEN 'BACK'.

LEAVE PROGRAM.

WHEN 'OK'.

SELECT SINGLE carrid connid fldate price currency planetype seatsmax seatsocc

FROM sflight INTO CORRESPONDING FIELDS OF tab

WHERE carrid = sflight-carrid

AND connid = sflight-connid

AND fldate = sflight-fldate.

CALL SCREEN 500.

  • SET PF-STATUS 'xxxxxxxx'.

  • SET TITLEBAR 'xxx'.

ENDCASE.

ENDMODULE. " STATUS_0500 OUTPUT

yes i have created but if give call screen statement in side pbo it gives error n if out of pbo it says statement not accesable and if remove that statement data not displayed .

20 REPLIES 20
Read only

Former Member
0 Likes
2,571

you are calling the screen inside the PBO of the same screen.. hence its creating a unending loop.

whats happening is

when you execute, screen 500 is getting ready to output, so PBO is called, again inside that you are calling 500, so again 500 gets ready, again PBO.. .aagain call screen nice loop without loop 😛

you need to take out the call screen 500 from that PBO module

Read only

Former Member
0 Likes
2,571

CALL SCREEN 500. should be outside of the module endmodule

Thanks

Bala Duvvuri

Read only

0 Likes
2,571

how to do out side of pbo can u explain n outupt is also not displayed

Read only

0 Likes
2,571

have you created a tcode for your screen ? what are you trying to achieve?

Nabheet

Read only

0 Likes
2,571

yes i have created but if give call screen statement in side pbo it gives error n if out of pbo it says statement not accesable and if remove that statement data not displayed .

Read only

0 Likes
2,571

Let says in your tcode you have screen 500.

then first screen will come 500

IN PAI you need to write which next screen you want to call. Secondly as i can see you are called same screen in PBO.

Lets imagin screen 500 is coming in PBO ithere is again a call for same screen so infinite loop.

Secondly data in PBO write the logi to assign your data from internal table or variables to screen fields if the name of both is not same

Nabheet

Read only

Former Member
0 Likes
2,571

Hi,

Place this code in PAI.

MODULE PAI INPUT.

CASE sy-ucomm .

WHEN 'BACK'.

LEAVE PROGRAM.

WHEN 'OK'.

SELECT SINGLE carrid connid fldate price currency planetype seatsmax seatsocc

FROM sflight INTO CORRESPONDING FIELDS OF tab

WHERE carrid = sflight-carrid

AND connid = sflight-connid

AND fldate = sflight-fldate.

IF SY-SUBRC = 0.

CALL SCREEN 500.

ENDIF.

ENDCASE.

ENDMODULE.

Read only

0 Likes
2,571

if i did this push button is not working

Read only

Former Member
0 Likes
2,571

asish,

what is the exact requirement??

Read only

0 Likes
2,571

i js want to show data on screen on the conditions of carrid conn id an fldate whn i puch ok button

Read only

0 Likes
2,571

no need of call screen again... are your input parameters on same screen as 500? if yes,

in the PAI module, write the code for select statement and pass the value to the required field. it will automatically be populated on screen

Read only

0 Likes
2,571

In PAI fetch the values and assign it to screen fields..thats it..no call screen in PBO

Nabheet

Read only

0 Likes
2,571

i did but still data not displayed on screen this code

module USER_COMMAND_0500 input.

CASE sy-ucomm .

WHEN 'BACK'.

LEAVE PROGRAM.

WHEN 'OK'.

SELECT SINGLE carrid connid fldate price currency planetype seatsmax seatsocc

FROM sflight INTO CORRESPONDING FIELDS OF tab

WHERE carrid = sflight-carrid

AND connid = sflight-connid

AND fldate = sflight-fldate.

IF SY-SUBRC = 0.

ENDIF.

ENDCASE.

Read only

0 Likes
2,571

Hi,

I am not able to get from where are you passing the values to carrid,connid and fldate in where clause in the select statemnet. If you have to pass these values taking as user input in the screen then first you have to create three input field on the screen.

After adding input fields you have to define three different variables of the same name as you have given to input fields on screen. Say if you name them cid, coid and fld so you should define them in your code.

data : cid like sflight-carrid,

coid like sflight-connid,

fld like sflight-fldate.

and your code for the PAI goes as .

MODULE USER_COMMAND_0200 INPUT.

CASE sy-ucomm .

WHEN 'BACK'.

LEAVE PROGRAM.

WHEN 'OK'.

SELECT SINGLE carrid connid fldate price currency planetype seatsmax seatsocc

FROM sflight INTO CORRESPONDING FIELDS OF tab

WHERE carrid = 'AC'.

  • AND connid = sflight-connid

  • AND fldate = sflight-fldate.

IF SY-SUBRC = 0.

  • loop at tab.

write:/ tab-carrid ,tab-connid ,tab-fldate ,tab-price ,tab-currency ,tab-planetype ,tab-seatsmax ,tab-seatsocc.

*

  • endloop.

ENDIF.

LEAVE TO LIST-PROCESSING.

ENDCASE.

ENDMODULE.

Hope this works..:)

Regards

Sumit

Edited by: sum_it2 on Jan 4, 2012 12:56 PM

Read only

0 Likes
2,571

Hi friend,

From your conversation i can get that you are using module pool program if so please check these things,

1. Check whether you have declared the ok_code correctly,

2. See whether the ok_code is getting cleared any where before the case statement.

3. See whether the fields which you need to display the result are mapped with the correct internal table which you are populating with values.

I think these will be the problem.

If you still face issues revert back to me i will help you.

Thanks,

Sri Hari

Read only

0 Likes
2,571

Hai,

you are fteching details in tab. After that move the details to screen fields.

move corresponding fileds of tab to screen fields.

Ex: move corresponding fields of wa to kna1.

Read only

0 Likes
2,571

hye all thanx i got my mistake whr i was wrong i was jst feching data from tabels to internal table but not moving it to screen whn i got my output from this code

MODULE user_command_0500 INPUT.

CASE sy-ucomm .

WHEN 'BACK'.

CALL SCREEN 100.

WHEN 'OK'.

SELECT SINGLE carrid

connid

fldate

price

currency

planetype

seatsmax

seatsocc

FROM sflight INTO (sflight-carrid,

sflight-connid,

sflight-fldate,

sflight-price,

sflight-currency,

sflight-planetype,

sflight-seatsmax,

sflight-seatsocc )

WHERE carrid = sflight-carrid

AND connid = sflight-connid

AND fldate = sflight-fldate.

*CALL SCREEN 500.

ENDCASE.

can any pls hel me that how i can move data from internal table to scrren fields

Read only

0 Likes
2,571

move the data to exact field names present on the screen. lets say screenfield is connid

then

connid = sflight-connid. "what ever is fetched from database

this will automatically come on screen

Read only

Former Member
0 Likes
2,571

Hi,

write the code in PAI section and call the screen in

which you want display your data.

make sure that the screen fileds with the name as tab-carrid

, tab-connid.... etc.

Read only

Former Member
0 Likes
2,571

Hi ashish,

Check wheather screen fields names and ABAP/4 variable names are same or not. If both names are the same, system transfers screen fields values to ABAP/4 programs fields and Vice Versa Otherwise you must manually transfer the data.

Hope this would be helpful for you.

Regards,

Supriya.