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

dynamic display on selection screen

Former Member
0 Likes
555

Hi All,

I have a tabbed block on the selection screen and need to display fields from an internal table dynamically using a step loop.

What I have done is, fill the Internal table in PBO of the 1st tab screen ie 100 screen, then initiated a loop for this internal table and inside the loop called a step loop for display of these fields.

But not able to display. Also in initialization, i have initiazed mytab-dynnr = 100.

Thanks.

4 REPLIES 4
Read only

Former Member
0 Likes
533

its better to post in ABAP GENERAL forum then u will get responces

Read only

former_member673464
Active Contributor
0 Likes
533

hi,

You can use loop with controls statement to transfer your data to the screen.You can intialise the screen using tab function code .In pbo declare the tabstrip-activetab = function code .

regards,

veeresh

Read only

Former Member
0 Likes
533

Hi kiret

for u i got a steploop and i am filling the values thart are in pbo module

just chk this sample code

FLOW LOGIC:

PROCESS BEFORE OUTPUT.

MODULE STATUS_0100.

*

LOOP at it_mara cursor topline.

MODULE transp_itab_out.

ENDLOOP.

PROCESS AFTER INPUT.

*loop at it_mara.

*endloop.

LOOP at it_mara.

MODULE transp_itab_in.

ENDLOOP.

MODULE USER_COMMAND_0100.

TOP INCLUDE:

data: begin of it_mara occurs 0,

matnr like mara-matnr,

maktx like makt-maktx,

end of it_mara.

data: wa like line of it_mara.

data: rec type sy-tabix.

DATA: idx TYPE i,

line TYPE i,

step TYPE i.

DATA TOPLINE TYPE I VALUE 1.

PBO:

MODULE STATUS_0100 OUTPUT.

  • SET PF-STATUS 'xxxxxxxx'.

  • SET TITLEBAR 'xxx'.

it_mara-matnr = '0000001'.

it_mara-maktx = 'abcd'.

append it_mara.

it_mara-matnr = '0000002'.

it_mara-maktx = 'efgh'.

append it_mara.

PAI:

MODULE USER_COMMAND_0100 INPUT.

ENDMODULE.

CUSTOM MODULES:

MODULE transp_itab_out OUTPUT.

step = sy-loopc.

idx = sy-stepl + line.

READ TABLE it_mara into it_mara INDEX idx.

ENDMODULE. " transp_itab_out OUTPUT

MODULE transp_itab_in INPUT.

step = sy-loopc.

idx = sy-stepl + line.

MODIFY it_mara FROM wa INDEX idx.

ENDMODULE. " transp_itab_in INPUT

Read only

Vijay
Active Contributor
0 Likes
533

hi...

to display the data from the internal table to the table control... you first need to fetch the data into the internal table during pbo event and the ctrl elements of the control table should have the same name as the internal table fields , so that when you fetch the data into the internal table it get automatically get filled into the internal table.

refer the code below.....

PROCESS BEFORE OUTPUT.

MODULE status_0101.

CALL SUBSCREEN : lineitems INCLUDING 'ZPURCR_71945' '1011'.

PROCESS AFTER INPUT.

MODULE exit_0101 AT EXIT-COMMAND.

CALL SUBSCREEN: lineitems.

MODULE user_command_0101.

***************************************************************************

&----


*& Module STATUS_0101 OUTPUT

&----


  • text

----


MODULE status_0101 OUTPUT.

WHEN 'PB_DISPLAY'.

  • perform to fetch data and display in the line items tab

PERFORM display_data_line_items.

ENDMODULE. " STATUS_0101 OUTPUT

<b>plz reward pts if helpful.</b>

regards

vijay