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

Table selection screen call

Former Member
0 Likes
963

Hi all,

I have a requirement to call the selection screen of EKKO table with a default set of parameters from a report.

On call the selection screen should always have the default fields of

EBELN

BUKRS

BSTYP

BSART

BSAKZ

LOEKZ

The option i could think of is to submit to the EKKO table standard program /1BCDWB/DBEKKO from my custom report.

But then how to set the selection screen componenets to the above required fields. Do we have any FM module for this ?

Appreciate your ideas.

Regards,

Stock

7 REPLIES 7
Read only

Former Member
0 Likes
835

Hi,

You can create a variant in SE16 for selection screen fields & save the variant.

Use BDC to call transaction SE16 & select the variant.

Best regards,

Prashant

Read only

0 Likes
835

Hi Prashant,

I tried creating the variant but it does not save the default componenets that is required. the other fields also comes up.

Thanks & Regards,

Stock

Read only

Former Member
0 Likes
835

You can also create a view of EKKO table with the required fields. Then create table maintenance generator for this view and maintain the view in EKKO or create transaction to maintain the view in SM30.

Read only

0 Likes
835

Hi,

The selction screen is required to display the data from the table based on the selection screen input parameters. No data are to be maintained.

Thanks & Regards,

Stock

Read only

Former Member
0 Likes
835

Do these things

First create a variant of EKKo table,

Second record in SHDB name ZSE16 with T_CODE SE16 , give name of table EKKO , Select the variant and press execute.

do neccesarry changes in BDC program and now create this BDC as a include program.

Now in your report program on the selected button use this include program.

Second case,

if you want new values to be entered in selection screen of EKKO every time from report program.

then SHDB record as above , after putting table name EKKO, display now go to <b>fields for selection, select only those which you want to populate,</b>

then record for all these fields.

now do changes in BDC program and replace these valuse with your report parameters which you want to pass to selection screen of EKKO.

reward if useful.

Amit Singla

Message was edited by:

Amit Singla

Read only

0 Likes
835

Hi Amit,

I need to end up in the selection screen of the EKKO table from the custom report.

for the BDC approach we need to background the first few steps of getting into the EKKO and the selection of fields from the settings option. Then how can we change to mode of BDC from Background to Foreground and end up in the selction screen from the report.

Appreciate your further views.

Thansk & Regards,

Stock

Read only

0 Likes
835

write a module pool for the same.

data : ok-code like sy-ucomm.

create variables for your selection screen criteria here are bold.

<b>DATA : P_EBELN LIKE EKKO-EBELN.

DATA : P_BUKRS LIKE EKKO-BUKRS.

DATA : P_AEDAT LIKE EKKO-AEDAT</b>.

<b>" create a structure for all fields of ekko</b>

DATA : begin of t_ekko.

include structure ekko.

data : end of t_ekko.

<b>create internal table for the output of structure type</b>

data : i_ekko like standard table of t_ekko with header line.

<b>this is your intial screen (input screen).</b>

p_ebeln _______

p_bukrs _______

p_aedat _______

SAVE BUTTON

<b>this is how you populate output.</b>

CASE OK-CODE.

WHEN 'SAVE'.

BREAK-POINT.

SELECT * FROM EKKO INTO TABLE I_EKKO WHERE EBELN = P_EBELN AND BUKRS = P_BUKRS AND

AEDAT EQ P_AEDAT.

ENDCASE.

now create a alv grid and show your output in that.

reward if useful.

Amit Singla