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

Regarding Module pool programming

Former Member
0 Likes
482

Hi All,

I have a issue in module pool programming.

Actually my issue is as below:

Actually in my program i am having one selection-screen<b>[Screen 100]</b> when i execute that screen it will take me to Tree report <b>[Screen 200]</b> in that i will select specific row and hit one button on Application Toll Bar. It will take me to <b>one module pool screen [Screen 300]</b> - This is Normal Screen, There i will have one text field <b>Order Number</b> what i need to do here is - when i press <b>F4</b> it should trigger me another screen <b>[Screen 400]</b> that screen i had given as <b>Model-Dialog Box</b>.

Upto above point i have done the development.

Now what i want is in <b>screen 400</b> i need to display multiple records.

I had already given column headings for the same.

Below it i need to display multiple records with Radio Button before it.

<b>Means i need to display first radio button, Order No, Order date, Contract No, Valid From , Valid To etc..</b>

For the 2,3,4 .... rows in the same way i need to display data with radio button before each row.

Now when i press <b>F4</b> in <b>[Screen 300]</b> it will take me to this <b>[Screen 400]</b> there from mutiple records i need to choose one record by pressing radio button before it.

And then i need to hit <b>Push Button CHOOSE</b> below all the rows and that [Screen 300] need to be filled up with selected row from [Screen 400].

Can anybody tell me how can i create multiple rows in <b>screen 400</b> with radio button before each row.

If anybody knows solution please post the same.

Thanks in advance.

Thanks & Regards,

Rayeez.

3 REPLIES 3
Read only

Former Member
0 Likes
457

Hi Shaik,

when you Press F4 help then you said screen 400 will come, instead of that screen you can do one thing , you can this FM REUSE_ALV_POPUP_TO_SELECT,

for this FM pass the data which you want to show, here you can get check box (instead of radio button). and you can get the selected line/lines also, using them you can fill your screen 300.


        CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
           EXPORTING
              I_TITLE         = 'Test'(012)
               I_SCREEN_START_COLUMN   = 30
               I_SCREEN_START_LINE     = 01
               I_SCREEN_END_COLUMN     = 100
               I_SCREEN_END_LINE       = 25
               <b>I_CHECKBOX_FIELDNAME    = 'CHECK'</b>
                I_TABNAME               = 'IT_VBAP'
               IT_FIELDCAT             = IT_FIELDCAT
          IMPORTING
               ES_SELFIELD              = WA_SELFIELD
           TABLES
                T_OUTTAB                = IT_VBAP
          EXCEPTIONS
               PROGRAM_ERROR           = 1
               OTHERS                  = 2.
        IF SY-SUBRC <> 0.

        ENDIF.

Regards

vijay

Read only

naimesh_patel
Active Contributor
0 Likes
457

Hello Shaik,

For this you have to create a step loop. You can only make certain number of rows step loop.

After creating stop loop, write a logic to fill the text fields against the radiobutton as per your requirement.

You can have a look at a screen 608 of program SAPMF05A. See the MODULE SEL_ANZEIGEN on Output.

User T-code F-32 to debug the screen.

T-code : F-32

Put Customer, company code and select "Others" radiobutton, this will bring one POP-UP (this screen in 608)

I haven't created this one, otherwise I am able to give my code..

Regards,

Naimesh

Read only

christian_wohlfahrt
Active Contributor
0 Likes
457

Hi Rayeez!

If you had a constant number of lines for screen 400, you could program this straight forward (there is a radiobutton -button in graphical screen painter, in attributes the group can be defined).

But how to get a dynamcial number of screen lines?

- List output -> nasty input handling, so better no leave-to-list processing

- Normal module pool screen (modal or amodal, doesn't matter) with 10 lines. If you don't fill up all lines, you can set the other lines in PBO in a 'loop at screen' invisible -> if you design your screen to small, you might not be able to display an exeptional big list.

- Normal screen, but with a table control (like VA02 for item list). Then it would be a little more complicate to display a radiobuttion in a column. But it's quite easy to display a selection-column and there is a flag in attributes, if you want to allow only single or multiple marked lines.

I would go for the table control - little bit different style, but best for a dynamical output. And you can refer to a lot of screens in SAP, where it's done the same way (ME21N, VA01, VF01, MM01 (units),...).

Regards,

Christian