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: 

Dump while fetching Query result from report

Former Member
0 Kudos

Hi experts,

I am facing an issue while fetching a SQ01 Query result in ALV format into a report via SUBMIT statement. The Query makes use of few local additional fields along with joins on some standard DB tables. These local additional fields takes up technical name as %Z_0001, %Z_0002, etc upon creation.

To execute this Query from my custom report, I am using SUBMIT statement as below

SUBMIT query_name USING SELECTION-SCREEN '1000'
WITH SELECTION-TABLE rspar_tab   ”rspar_tab contains all the input
WITH %alv EQ c_x                ”allows the list to be downloaded in ALV
AND RETURN.

Now, when I am trying to retrieve the list returned by this query into my data table, it is causing dump straightaway in the below statement of my program.

cl_salv_bs_runtime_info=>get_data_ref(IMPORTING r_data = lr_pay_data ).

The dump cites the reason 'Component Name '%Z_0001' of the Component 13 Contains an Invalid Character'. This is raised in standard code where it is preparing the field-catalog and checks for illegal characters in component name. Here it is treating '%' symbol as illegal.

While I am able to fetch ALV quite comfortably with queries having no local additional fields, it is posing issues for above case. Kindly suggest if there is an alternative to fetch ALV output in our reports from such queries.

Thanks!

1 ACCEPTED SOLUTION

former_member183224
Participant
0 Kudos

Hi Siddhartha,

You are getting this dump because the name foe local additional fields given by you has invalid character "%". As sap recommends never use invalid characters in your naming conventions.

Please see the below link for SAP's naming convention standards:

http://saptechnical.com/Tutorials/ABAP/PrgStandards/PrgStandards.htm

http://help.sap.com/saphelp_nw73/helpdata/en/2a/6b0afe547a11d189600000e829fbbd/frameset.htm

I hope it will be helpful.

Regards,

Gourav

3 REPLIES 3

Former Member
0 Kudos

Hello,

I would say that this is because special characters for variables are no longer allowed in the object context (your call to cl_salv_bs_runtime_info=>get_data_ref), as it still is in the procedural context.

"Type Definitions and Data Declarations

New naming conventions

The names of components in classes, that is attributes, methods and events, must consist of the characters "A-Z", "0-9" and "_". They must not begin with a number."

Check http://scn.sap.com/docs/DOC-10274

former_member183224
Participant
0 Kudos

Hi Siddhartha,

You are getting this dump because the name foe local additional fields given by you has invalid character "%". As sap recommends never use invalid characters in your naming conventions.

Please see the below link for SAP's naming convention standards:

http://saptechnical.com/Tutorials/ABAP/PrgStandards/PrgStandards.htm

http://help.sap.com/saphelp_nw73/helpdata/en/2a/6b0afe547a11d189600000e829fbbd/frameset.htm

I hope it will be helpful.

Regards,

Gourav

0 Kudos

Hi,

Thanks for reverting in short time.

The naming convention should not contain any '%' sign is completely understandable but the fact that it has been assigned by system itself is causing the issue. As I mentioned earlier, whenever we are declaring any local additional field in query, SAP does give the technical name as '%Z_****'. I could not find any provision to change it and hence moving ahead using the same in custom program. Afterwards, when we are trying to read the ALV table contents, it results in dump citing '%' as invalid character.

In debugging mode, I removed '%' sign and it executed smoothly. But since the convention check is happening in standard method, I could not modify it in my program.

Hope the scenario is clear now.

regards,

Sid.