Application Development 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: 

problem in screen whilw calling it from report

Former Member
0 Kudos

Hi friends,

I have created a report which contains a selection screen with following fields.

Selection screen

all are slect optins.

VBELN

KUNNR

MATNR

now when i enter the values in these slection screen and execute it,

it basically calls a screen 100 ( module pool program ) and displays the value of that particular sales order number in the screen 100 and that screen contians a table control which basically displays the line items(POSNR) of that particular VBELN.

now my problem is when the ist time iam giving the value of VBELN as 1000 in the report select option and executing.

its displyaing the value of VBELN in screen and posnr in the tbale control.

now when i go back to the selection screen from the screen 100 and if i leave the VBELN field empty and execute it. it has to display all the posnr of all the sales order number.

but it is displaying the previous vbeln 1000 .

How can i clear that.

Regards,

Priyanka.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

Probably u need to refresh the attribute of table control and/or set the number of records to be displayed, for this u can use:

REFRESH CONTROLl <TABLE CONTROL> FROM SCREEN <DYNPRO>.

and if ITAB is the internal table with all data to be displyed:

DESCRIBE TABLE ITAB LINES <TABLE CONTROL>-LINES.

U make sure to refresh the internal table before filling it again.

Max

9 REPLIES 9

Former Member
0 Kudos

Hi

When you are going back to selection-screen .

Refresh all the data in the table control and then exit.

Regards

Neha

0 Kudos

can u please be clear how can i do that.

Regards,

Priyanka

former_member181995
Active Contributor
0 Kudos

Can you show piece of code from PAI ?If it is not so lengthy.

0 Kudos

Its a very big code...

i cant post the code here.

can u please tell me how can u clear the value of VBELN I=in selection screen and the next navigation screen ie : screen 100.

0 Kudos

See above Max's code.

For more info just check F1 help of Refresh contol.

Former Member
0 Kudos

Hi

Probably u need to refresh the attribute of table control and/or set the number of records to be displayed, for this u can use:

REFRESH CONTROLl <TABLE CONTROL> FROM SCREEN <DYNPRO>.

and if ITAB is the internal table with all data to be displyed:

DESCRIBE TABLE ITAB LINES <TABLE CONTROL>-LINES.

U make sure to refresh the internal table before filling it again.

Max

Former Member
0 Kudos

Hi,

Also try to refresh work area or variable in which u are maintaining the value of VBELN.

Thanks & Regards

Ruchi Tiwari

Former Member
0 Kudos

Hi,

You can achieve it by some simple code in the PBO of 100.

Ex: Selection screen VBELN field name is P_VBELN.

Screen field VBELN is S_VBELN and IT_POSNR is the table to hold item details of entered VBELN

In PBO, Try the below code:

Process Before Output.

Module select_data.

Module select_data.

S_VBELN = P_VBELN.

refresh it_posnr.

if s_vbeln is not initial.

SELECT * from VBAP into table it_posnr where vbeln = s_vbeln.

else.

<select all data>

endif.

Endmodule.

Thanks,

Lakshmi

Former Member
0 Kudos

You can use an alternate way to lonk a Selection screen and a module pool screen as mentioned below:

Let 1000 be the screen on which you want to put Range button.

Make a subscreen area on it. Let it be named as sub_area.

Now make a selection screen in your program.

SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.

SELECT-OPTIONS R_PERNR FOR PERNR-PERNR.

SELECTION-SCREEN END OF SCREEN.

Now in screen 1000 flow logic, we can call the selection screen in the sub screen area defined.

In PBO of 1000

CALL SUBSCREEN SUB_AREA INCLUDING SY-REPID '0100'.

Now, code in AT SELECTION-SCREEN OUTPUT event will be exe.

In PAI of 1000

CALL SUBSCREEN SA_SS. as the first line after PAI

Now, AT SELECTION-SCREEN event will be exe.

Using above method u will get the functionality of Select-Options of Selection Screen on a Module Pool Screen.