2012 Jan 04 8:32 AM
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
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
2012 Jan 04 8:47 AM
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
2012 Jan 04 8:48 AM
CALL SCREEN 500. should be outside of the module endmodule
Thanks
Bala Duvvuri
2012 Jan 04 9:24 AM
how to do out side of pbo can u explain n outupt is also not displayed
2012 Jan 04 9:26 AM
have you created a tcode for your screen ? what are you trying to achieve?
Nabheet
2012 Jan 04 9:34 AM
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 .
2012 Jan 04 9:37 AM
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
2012 Jan 04 8:56 AM
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.
2012 Jan 04 9:22 AM
2012 Jan 04 9:41 AM
2012 Jan 04 9:48 AM
i js want to show data on screen on the conditions of carrid conn id an fldate whn i puch ok button
2012 Jan 04 9:55 AM
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
2012 Jan 04 9:58 AM
In PAI fetch the values and assign it to screen fields..thats it..no call screen in PBO
Nabheet
2012 Jan 04 10:18 AM
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.
2012 Jan 04 11:55 AM
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
2012 Jan 04 12:17 PM
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
2012 Jan 04 12:17 PM
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.
2012 Jan 05 8:02 AM
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
2012 Jan 05 8:07 AM
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 databasethis will automatically come on screen
2012 Jan 04 12:02 PM
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.
2012 Jan 04 12:06 PM
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.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |