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: 

Issue with RM06ENBE report copy

Former Member
0 Kudos

Hi,

I have created a custom report which is a copy of standard report RM06ENBE, the standard selection screen has dynamic selection screen .The stanadard prog uses the LDB to fetch the data. Now I want to  insert the dynamic selection screen conditions also to be imposed in  my programe.

Thanks,

RG

1 ACCEPTED SOLUTION

pranay570708
Active Contributor
0 Kudos

Hi Ramya,

whenever a logical database is attached with a report, it automatically adds dynamic selection screen button on the report selection screen. To remove it write below code in your INITIALIZATION event.


INITIALIZATION.

   DATA: T_EXCLUDE TYPE STANDARD TABLE OF SYPFKEY.

   APPEND 'DYNS' TO T_EXCLUDE.

   "DYNS is the dynamic selection screen function code.

   CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

     EXPORTING

       P_STATUS  = SY-PFKEY

     TABLES

       P_EXCLUDE = T_EXCLUDE.

8 REPLIES 8

Sandra_Rossi
Active Contributor
0 Kudos

What kind of issue do you have? (EDIT: removed because no sense Is there with PARAMETERS/SELECT-OPTIONS or what?)

PS: that's not the topic, I know this is a general practice but copying a standard program is usually reserved to very simple programs or exceptional situations, and is a bad practice for all other programs, because upgrades will ignore the copies (discussed in SAP note 213751, in the forum, blogs, etc.)

0 Kudos

Hi Sandra,

Thanks for your reply.

Yes, I agree and its not a standard practice and my requirement is to add custom fields  in the ME2A report output . When  I update those fields in the report output  those fields would be updated in the PO.

Basically SAP has a enhancement to display custom fields at the report output and does not have a option to edit the custom added fields at the report output.

so I had copied the RM06ENBE report to custom, Now I  have a dynamic selection screen , how can I restrict the selection to include dynamic selection screen.

Thanks,

RG

Jelena
Active Contributor
0 Kudos

Basically SAP has a enhancement to display custom fields at the report output and does not have a option to edit the custom added fields at the report output.

I'm very much confused - are you somehow expecting an editable ALV that will also perform the actual database updates of some custom fields? How did you arrive at the conclusion that copying this standard program is a suitable solution?

0 Kudos

Hi Jelena,

Thanks for your reply,

Could you please suggest for better solution other than copying the standard report into a custom.

My requirement is for the ME2A report output I want to update custom fields at the PO , and basically the custom field values would be given at the report output.

Thanks,

RG.

Jelena
Active Contributor
0 Kudos

Ramya g wrote:

My requirement is for the ME2A report output I want to update custom fields at the PO , and basically the custom field values would be given at the report output.

Sooo... editable ALV then? Google -> "editable ALV site:sap.com".

thanga_prakash
Active Contributor
0 Kudos

dynamic selection in the standard report RM06ENBE is achieved by statement.

SELECTION-SCREEN DYNAMIC SELECTIONS FOR TABLE: EKKO, EKPO.

which you can find it in Selections of Logical database ENM.

In your case since you have not used Logical database. you won't be able to use the above statement.

You can try to give additional selection fields like in the transaction VA05, when you click on the Further sel. criteria, additional fields will be shown in pop up and you can use them.

pranay570708
Active Contributor
0 Kudos

Hi Ramya,

whenever a logical database is attached with a report, it automatically adds dynamic selection screen button on the report selection screen. To remove it write below code in your INITIALIZATION event.


INITIALIZATION.

   DATA: T_EXCLUDE TYPE STANDARD TABLE OF SYPFKEY.

   APPEND 'DYNS' TO T_EXCLUDE.

   "DYNS is the dynamic selection screen function code.

   CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

     EXPORTING

       P_STATUS  = SY-PFKEY

     TABLES

       P_EXCLUDE = T_EXCLUDE.

Sandra_Rossi
Active Contributor
0 Kudos

I have just looked at ME2A transaction in SAP ERP system (monitor vendor confirmations). I now understand why you want to copy it, it's only a 300 lines program, with a minimal use of REUSE_ALV_GRID_DISPLAY.

Of course, it won't be automatically updated at the next upgrade, but it's up to the client to decide (anyway, it won't harm the standard/if the update logic is correctly done, using BAPIs for instance).

In the program, it's easy to add your own selections, is that an issue if you do the ABAP filter logic in the GET events? Is there a performance issue?

And for the update, do whatever you want. That's the most complex part of the program.

Please explain carefully, because currently I think you receive very approximative answers which can't satisfy you.