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

Module pool Table control

Former Member
0 Likes
492

Hi Frnds,

I had an idea and written a code for Module pool Programming as given below.

I have created two screens 1000 and 1001.

In the 1000 screen i hav created few fields like

Purchase order number

Company code

and a button GET.

Then i had one more screen 1001 where i hav put a table control which has fields like

Purchase order number

Item number

material number

AEDAT.

So when i press GET IN 1000 SCREEN THEN it shuld LEAVE TO SCREEN 1001 and display Purchase order details.

But my problem is its going to 1001 Screen but its not displaying the PO details in table control

I am giving my code which ihav written plz correct me where if i m wrong

In 1000 flow logic code.

<code> &----


*& Report Z_50840_TABCONTROL

*&

&----


*&

*&

&----


REPORT Z_50840_TABCONTROL

MESSAGE-ID zmsg_demo.

CONTROLS TAB_CONTROL TYPE TABLEVIEW USING SCREEN '1001'.

DATA : BEGIN OF ITAB OCCURS 0,

ITAB_EBELN TYPE EKPO-EBELN,

ITAB_EBELP TYPE EKPO-EBELP,

ITAB_AEDAT TYPE EKPO-AEDAT,

ITAB_MATNR TYPE EKPO-MATNR,

ITAB_BUKRS TYPE EKPO-BUKRS,

END OF ITAB.

DATA : EKKO_EBELN TYPE EKKO-EBELN,

EKKO_BUKRS TYPE EKKO-BUKRS,

EKKO_BEDAT TYPE EKKO-BEDAT,

VALUE LIKE EKKO_EBELN,

fill TYPE i,

ok_code TYPE sy-ucomm,

save_ok LIKE ok_code.

CALL SCREEN 1000.

&----


*& Module STATUS_1000 OUTPUT

&----


  • text

----


module STATUS_1000 output.

SET PF-STATUS 'ABC'.

SET TITLEBAR 'XXX'.

endmodule. " STATUS_1000 OUTPUT

&----


*& Module USER_COMMAND_1000 INPUT

&----


  • text

----


module USER_COMMAND_1000 input.

save_ok = ok_code.

CLEAR ok_code.

CASE save_ok.

WHEN 'BACK'.

LEAVE TO SCREEN 0.

WHEN 'GET'.

VALUE = EKKO_EBELN.

LEAVE TO SCREEN 1001.

ENDCASE.

endmodule. " USER_COMMAND_1000 INPUT

&----


*& Module STATUS_1001 OUTPUT

&----


  • text

----


module STATUS_1001 output.

SET PF-STATUS 'XYZ'.

SET TITLEBAR 'AB'.

SELECT EBELN

EBELP

AEDAT

MATNR

BUKRS

FROM EKPO

INTO CORRESPONDING FIELDS OF TABLE ITAB

WHERE EBELN = VALUE.

endmodule. " STATUS_1001 OUTPUT

&----


*& Module DISPLAY_DETAILS INPUT

&----


  • text

----


module DISPLAY_DETAILS input.

endmodule. " DISPLAY_DETAILS INPUT

&----


*& Module MODIFY_DETAILS INPUT

&----


  • text

----


module MODIFY_DETAILS input.

MODIFY itab INDEX TAB_CONTROL-current_line.

endmodule. " MODIFY_DETAILS INPUT

&----


*& Module USER_COMMAND_1001 INPUT

&----


  • text

----


module USER_COMMAND_1001 input.

save_ok = ok_code.

CLEAR ok_code.

CASE save_ok.

WHEN 'BACK'.

LEAVE TO SCREEN 1000.

ENDCASE.

endmodule. " USER_COMMAND_1001 INPUT </code>

In flowlogic 1001

<code> ROCESS BEFORE OUTPUT.

loop at Itab with control TAB_CONTROL cursor TAB_CONTROL-current_line.

endloop.

MODULE STATUS_1001.

PROCESS AFTER INPUT.

LOOP AT ITAB.

MODULE DISPLAY_DETAILS.

MODULE MODIFY_DETAILS.

ENDLOOP.

MODULE USER_COMMAND_1001. </code>

Frnds plzz correct me if i m wrong anywhere.

thnks

satish

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
469

Try adding the refresh statement seen here.




module STATUS_1001 output.
SET PF-STATUS 'XYZ'.
SET TITLEBAR 'AB'.
SELECT EBELN
EBELP
AEDAT
MATNR
BUKRS
FROM EKPO
INTO CORRESPONDING FIELDS OF TABLE ITAB
WHERE EBELN = VALUE.


refresh control 'TAB_CONTROL' from screen 1001.

endmodule. " STATUS_1001 OUTPUT




Regards,

Rich Heilman

Read only

0 Likes
469

Hi Rich,

Thanks for reply.

I have tried doing this. But still its not working out.

satish

Read only

0 Likes
469

The PO number field in screen 1000, make sure that it has a conversion exit as ALPHA in the screen painter. You can do this but double clicking on the field in screen painter, and filling in the appropriate input field on one of the tabs at the bottom of the dialog.

Regards,

Rich Heilman

Read only

0 Likes
469

Hi Rich,

See but as i m checking the from dictionary field so its automatically converting the values.

Can u plz clarify

Thnks,

satish