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

Custom execute button in selection screen

Former Member
0 Likes
4,861

Hi,

I am designing a selection screen where it is required that the execute button on the selection screen should download all RICEF ID related BRF entries for the selected Business Area.The selection should be for multiple selections

If only one business area is selected the name of the downloaded file should be as follows:

Example for RTC, it will be RTC_BRF_Value Table_Date(09/16/2013)

If all are selected then, it will be BRF_Date (09/16/2013)

Can anyone please suggest me how to design custom execute button for this requirement..

Thanks In Advance...



1 ACCEPTED SOLUTION
Read only

m4abrams
Participant
0 Likes
3,384

Hi,

There are 2 questions here.

1.Display an execute button in your report

2.Download table entries.

For Part 1.

  1. Its suggested not to make changes to your default selection screen (screen number 1000) since they are dynamically created.
  2. You could add a new screen 9999 to your report (via the object list CTRL+SHIFT+F5 , Right click > Create new Screen)
  3. Add a new PBO and PAI to this screen.
  4. Create a new PF-STATUS for this report. Add all the buttons you need in the PF-Status.
  5. Use SET PF-STATUS command in your screen 9999 PBO.
  6. If you are adding a new screen to the report, the programming style becomes similar to MODULE POOL.

For Part 2.

Please supply more information about your requirement.

Hope this helps.

Abraham

9 REPLIES 9
Read only

PeterJonker
Active Contributor
0 Likes
3,384

I don´t think you need a `custom` execute button for this.

You can execute the program normally and check in your at selection screen if single or multiple selection has been filled in and change the filename accordingly.

Read only

0 Likes
3,384

but how to download the entries from the table based on selection???

Read only

0 Likes
3,384

To create button on selection screen

Copy the Standard PF-STATUS and create Z***.

Add your button FC01, FC02...

AT SELECTION-SCREEN.

  CASE sscrfields-ucomm.
    WHEN 'FC01'.

          -Do your code

AT SELECTION-SCREEN OUTPUT.
  SET PF-STATUS 'Z***'.

Read only

0 Likes
3,384

Some remarks :

  • To add up to 4 buttons (without copying standard status) use syntax SELECTION-SCREEN PUSHBUTTON. (Their values will be FC01 to FC04)
  • If you need more than 5 buttons (or for aesthetic reasons) On a selection-screen SET PF-STATUS wont change the status (ref), use FM RS_SET_SELSCREEN_STATUS.

Regards,

Raymond

Read only

m4abrams
Participant
0 Likes
3,385

Hi,

There are 2 questions here.

1.Display an execute button in your report

2.Download table entries.

For Part 1.

  1. Its suggested not to make changes to your default selection screen (screen number 1000) since they are dynamically created.
  2. You could add a new screen 9999 to your report (via the object list CTRL+SHIFT+F5 , Right click > Create new Screen)
  3. Add a new PBO and PAI to this screen.
  4. Create a new PF-STATUS for this report. Add all the buttons you need in the PF-Status.
  5. Use SET PF-STATUS command in your screen 9999 PBO.
  6. If you are adding a new screen to the report, the programming style becomes similar to MODULE POOL.

For Part 2.

Please supply more information about your requirement.

Hope this helps.

Abraham

Read only

Former Member
0 Likes
3,384

Hi Starlet,

My requirement is -

     Selection screen should have business area having multiple selection option.Also it must have a execute button which will download all RICEF id related BRF table entries for the selected business area.

If only one business area is selected the name of the downloaded file should be as follows:

Example for RTC, it will be RTC_BRF_Value Table_Date(09/16/2013)

If all are selected then, it will be BRF_Date (09/16/2013)

Downloaded file can be a text file.

Please Help...

Read only

0 Likes
3,382

Hi Umesh,

As far as I can understand from your above requirement please view these pointers.

  1. I would suggest building a normal report. Dont add new screens or buttons.
  2. Allow User to pass all the business areas (single or multiple) as input data. i.e your basic select option. You must choose whether to disble/enable your select TO option. The arrow you see will allow the user to enter multiple business areas.
  3. Start of Selection event must have the logic as you specified:-

    ...download all RICEF id related BRF table entries for the selected business area.

  4. For each business area that is input by the user you will need to perform Naming of the files as per business area and GUI_DOWNLOAD to save as text file. Be it Single or Multiple business areas I think the same logic can be executed if placed correctly within a LOOP statement.
  5. Use the CONCATENATE statement to name your files before saving them.

I understand this is a basic report program. Go ahead and start working on the program.

GOOD LUCK

Hope this helps.

Read only

Former Member
0 Likes
3,382

Hi Starlet,

Can you please explain point no.4 in detail,If possible with an example.

Read only

0 Likes
3,382

Hi Umesh,

Point # 4

This is your basic report logic here. I am not fully versed with your requirement. But I will help as much as I can.

  1. Fetch all necessary data from db for the given select-option.
  2. Loop at all the business areas specified by the user in the select option.
  3. Since you mentioned downloading table entries, you will have to use FM : GUI_DOWNLOAD or similar FMs to download the contents of your itab to the local PC. Within the loop you will need to write the logic to name your file. Any other processing or logic which will be applicable to all business areas needs to also be done here.

I guess you will have to start working and let us know when you get stuck at some point.

There are lot of posts on SCN on GUI_DOWNLOAD and related FMs.

Hope I helped.

Abraham