‎2007 Apr 20 12:23 PM
Hi gurus,
I am able to declare my select-options by calling a sub screen in moduel pool program.
on output screen i need an output of itab in table control.
for this i am using a loop at itab in PBO AND PAI.
as soon as the debugger reaches this loop statement in PBO its throws a dump saying " DYNP_WRONG_SCREEN_TYPE".
Please help me getting my output into the table control by using select-options in Dialog Programming.
Regards,
Roshan Lilaram.
‎2007 Apr 20 12:28 PM
Hi,
You can't use select-options in Dialog programming. Use in Report programing only
Design a screen for those two select-options fields and keep them on the screen and keep a button.
when you press that button, the data will be displayed in the table control of the next screen or you can keep the fields and the table control in a single screen.
reward if useful
regards,
ANJI
‎2007 Apr 20 12:27 PM
check in the attributes of the subscreen that it is declared as subscreen
‎2007 Apr 20 12:28 PM
Hi,
You can't use select-options in Dialog programming. Use in Report programing only
Design a screen for those two select-options fields and keep them on the screen and keep a button.
when you press that button, the data will be displayed in the table control of the next screen or you can keep the fields and the table control in a single screen.
reward if useful
regards,
ANJI
‎2007 Apr 20 12:34 PM
COuld you please gimme some kinda code to give both in the same screen .
Please help me.
‎2007 Apr 20 1:09 PM
Hi
Suppose u have on input two text box inplace of select option.
based on what user enter the data and press enter in the PAI just select the value using select query and leave to screen with the table control.Once its der in pbo assign that value and pai fetch if some change is der...
i hope it will help..
incase not please provide me the description of exactly what u want
‎2007 Apr 20 12:34 PM
Hi Roshan,
Don't use select-options in dialog programming.
If u want u can use the input to that dialog programming by using the normal screen By using that we can fetch the data by providing the logic in subscreen.
i am providing the example.
&----
*
*& Module pool YNORMALSCREEN *
*& *
&----
*& *
*& *
&----
PROGRAM YNORMALSCREEN .
TABLES : KNA1,VBAK, VBAP.
DATA : BEGIN OF KTAB OCCURS 0,
KUNNR LIKE KNA1-KUNNR,
NAME1 LIKE KNA1-NAME1,
ORT01 LIKE KNA1-ORT01,
LAND1 LIKE KNA1-LAND1,
END OF KTAB.
DATA : BEGIN OF ITAB OCCURS 0,
VBELN TYPE VBAK-VBELN,
ERDAT TYPE VBAK-ERDAT,
NETWR TYPE VBAK-NETWR,
END OF ITAB.
DATA: BEGIN OF JTAB OCCURS 0,
POSNR TYPE VBAP-POSNR,
MATNR TYPE VBAP-MATNR,
END OF JTAB.
CONTROLS: VCONTROL TYPE TABLEVIEW USING SCREEN '120',
VCONTROL1 TYPE TABLEVIEW USING SCREEN '140'.
DATA: F_VAL(10) TYPE N, F_NAME(20).
&----
*& Module USER_COMMAND_0100 INPUT
&----
text
----
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'DISPLAY'. SELECT KUNNR NAME1 ORT01 LAND1 FROM KNA1 INTO
TABLE KTAB WHERE KUNNR = KNA1-KUNNR.
SELECT VBELN ERDAT NETWR FROM VBAK INTO TABLE ITAB
WHERE KUNNR = KNA1-KUNNR.
WHEN 'SALES'. CALL SCREEN '120'.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
&----
*& Module USER_COMMAND_0120 INPUT
&----
text
----
MODULE USER_COMMAND_0120 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'. LEAVE TO SCREEN '100'.
WHEN 'ITEM'.
GET CURSOR FIELD F_NAME VALUE F_VAL.
SELECT POSNR MATNR FROM VBAP INTO TABLE JTAB WHERE
VBELN = F_VAL.
CALL SCREEN '140'.
ENDCASE.
ENDMODULE. " USER_COMMAND_0120 INPUT
&----
*& Module STATUS_0120 OUTPUT
&----
text
----
MODULE STATUS_0120 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
MOVE-CORRESPONDING ITAB TO VBAK.
VCONTROL-LINES = SY-DBCNT.
ENDMODULE. " STATUS_0120 OUTPUT
&----
*& Module USER_COMMAND_0140 INPUT
&----
text
----
MODULE USER_COMMAND_0140 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'. LEAVE TO SCREEN '120'.
WHEN 'EXIT'. LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0140 INPUT
&----
*& Module STATUS_0140 OUTPUT
&----
text
----
MODULE STATUS_0140 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
MOVE-CORRESPONDING JTAB TO VBAP.
VCONTROL1-LINES = SY-DBCNT.
ENDMODULE. " STATUS_0140 OUTPUT
&----
*& Module STATUS_0100 OUTPUT
&----
text
----
MODULE STATUS_0100 OUTPUT.
LOOP AT KTAB .
MOVE-CORRESPONDING KTAB TO KNA1.
ENDLOOP.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*******rewords some ponts.
Rgds,
P.Naganjana Reddy
‎2007 Apr 20 1:14 PM
HI,
AFTER PROCESS BEFORE O/P.
CALL SUBSCREEN SUB INCLUDING 'PRG NAEM' DYNNR.
PROCESS AFTER INPUT
CALL SUBSCREEN SUB.
IN MODULE USER-COMMAND-0100 INPUT.*
CASE SY-UCOMM.
WHEN 'INPUT'.
DYNNR = '0200'.
TB-ACTIVETAB = 'INPUT'.
WHEN 'OUTPUT'.
DYNNR = '0300'.
TB-ACTIVETAB = 'OUTPUT'.
ENDCASE.
ENDMODULE.
IN MODULE_USER_COMMAND_-0200 I/P.
CASE SY-UCOMM.
WHEN 'FETCH'.
SELECT * FROM UR TABLE NAME' WHERE FIELD = TABLE NAEM-FIELD NAME.
ENDSELECT.
WHEN 'ENTER'.
DYNNR = 0300.
TB-TABTRIP = 'OUTPUT'.
SEELCT * FROM TABLE NAME WHERE FIELD NAME = TABLE-FIELD NAME.
ENDSELECT.
ENDCASE.
ENDMODULE.
THEN IN * MODULE_USER_CMMD_-0300.
CASE SY-UCOMM.
WHEN 'BACK'.
DYNNR = -'0200'.
TB-ACTIVETAB = 'INPUT'.
WHEN 'EXIT'.
LEAVE THE PRG.
ENDCASE.
ENDMODULE.
IF U FEEL THT IT HAS SOLVE DUR PROBLEM THEN DONT FORGET TO REWARD POINTSS FOR IT.
WITH REGARDS,
MADHURI.
‎2007 Apr 20 1:42 PM
i am sorry guys , i am unbale to understand you guys.
its mandatory for me to use select-options and i need to get output in table control.
once all the inputs are given then i need to press some push button to get the output in the table control, for using table control i need to use a loop.
‎2007 Apr 20 1:48 PM
hi roshan,
In the report program after the select option gets selected u can move on the dialog program using the statement Call screen '100'. so that u can move on to the table control from then onwards.
Regards...
Arun.
‎2007 Apr 20 2:14 PM
okie...
what you can do is crete a report ..Create ur selection screen...Once it is creted click the navigation button crete ur own screen with table control..Once u have fetched all the values after pressing a button call screen 100 or wat you may want let me know if you need the code i can send you..
if u want when user presse a button n selection screen u can crete a button using set pf status..
its very easy give it a try...
if u need the code just let me know will post that bcoz i have done it already
‎2007 Apr 23 10:30 AM