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

Short dump:The current statement only supports character-type data objects.

Former Member
0 Likes
5,325

Hi Experts,

I am calling a zreport inside my user exit. This zprogram is wirtten to show a dialog box screen having an ALV.

If I am executing the zprogram seperately thenits working fine, but if I am executing it by subit statemmt form the user exit then at this METHOD it thorws an error somewhere indie:- CALL METHOD ->set_table_for_first_display.

Kindly tell what might be the possible reason. CAlling is like:-

CALL METHOD grid->set_table_for_first_display

EXPORTING

  • i_save = 'A'

  • I_STRUCTURE_NAME = 'ZPPM_OPERATION'

is_lAYOUT = GS_LAYOUT

CHANGING

IT_OUTTAB = IT_ZCP_DEMAND_SYS1

IT_FIELDCATALOG = I_FIELDCAT.

21 REPLIES 21
Read only

former_member212005
Active Contributor
0 Likes
3,105

<copy&paste_removed_by_moderator>

Edited by: Julius Bussche on Jan 8, 2010 9:43 PM

Read only

0 Likes
3,105

You should have post [ the link |http://sap.ittoolbox.com/groups/technical-functional/sap-dev/alv-grid-in-background-737708]from where you pasted the answer.

Read only

0 Likes
3,105

Agreed Amit.....but some times the moderator blocks the reply for pasting a different site's link....

Read only

0 Likes
3,105

Hi Vin,

As i mentioned the ALV is working fine and so the Zreport if I am executing it directly(not by submit Zreport inside exit). So, Will this be a =n issue?

Read only

0 Likes
3,105

Udit...check the link which AMIT has given.....it had a similar kind of issue (but in background).....

Try it...

Read only

0 Likes
3,105

Hi,

I did not get the idea what I need to do, in the link. Please help me understanding the concept.

Read only

0 Likes
3,105

Do this:

When preparing the field catalog

Give reference table and reference field .

This will surely solve your problem

Read only

0 Likes
3,105

Hi,

my general solution is:

1) create dictionary structure or at least use only fields with dictionary types with domain.

2) use SALV (CL_SALV_TABLE)

Then all your problems have gone.

Regards,

Clemens

Read only

0 Likes
3,105

Thanx Abishek,

I implemented ref_fieldname and ref_tablename in fieldcatalog but now i am getting dump CNTL_ERROR.

pls help

Read only

0 Likes
3,105

Can you tell where are you getting this dump.

And elaborate what message are you getting .

Read only

0 Likes
3,105

at least create a dictionary structure for the alv display table, pass the name with ...first_display. Also make sure that any special fields i.e. for cell color or style that you reference in the layout structure exist in the table structure.

You will not get a dump if you follow this.

Regards,

Clemens

Read only

0 Likes
3,105

> Agreed Amit.....but some times the moderator blocks the reply for pasting a different site's link....

ittoolbox is not blocked because they have not spammed us with plagiarised information and link-farms.

Posting a link on it's own is anyway questionable -> the person could have found it themselves if they had used the search.

If you can answer by simply going a search, then rather tell the person to search as well....

Cheers,

Julius

Read only

0 Likes
3,105

Hi Abhishek,

The new error messgae now I am getting is :-Exception condition "CNTL_ERROR" raised.

The palce is somewhere in standard code:-

  • check handle

IF ME->H_CONTROL IS INITIAL.

RAISE CNTL_ERROR.

ENDIF.

Kindly tell if something else is required after implementing those two things you told.

Read only

0 Likes
3,105

i mean are you getting this dump for field catalog itself or something else.

Can you paste the code here or atleast tell for which fields you are

trying to make a field catalog so that we can help.

It may be possibly due to incorrect assignment or same

assignment related statement for the grid.

Edited by: AbhisheksinghTomar on Jan 11, 2010 11:31 AM

Read only

0 Likes
3,105

Hi Experts,

I am using method set_table_for_first_display, CNTL->ERROR is coming because of passing fieldcatalog to the method,

If i comment fieldcatalog in method grid is displayed but without fieldcatalog.

Pls note: This code(for ALV) is written in a Zreport, and this Zreport is called inside a user-exit.

data: lt_celltab TYPE lvc_t_styl,

l_index TYPE i.

CLEAR :I_FIELDCAT,I_FIELDCAT[],WA_FIELDCAT.

WA_FIELDCAT-col_pos = 1.

WA_FIELDCAT-FIELDNAME = 'ZC_SUPPLIER'.

WA_FIELDCAT-REF_FIELD = 'ZC_SUPPLIER'.

WA_FIELDCAT-REF_TABLE = 'ZCP_DEMAND_SYS'.

WA_FIELDCAT-reptext = 'SUPPLIER'.

  • WA_FIELDCAT-QUANTITY = 'X'.

  • WA_FIELDCAT-seltext = 'OPERATION'.

WA_FIELDCAT-outputlen = '9'.

  • WA_FIELDCAT-EDIT = ' '.

APPEND WA_FIELDCAT to I_FIELDCAT.

WA_FIELDCAT-col_pos = 2.

WA_FIELDCAT-fieldname = 'ZC_CUSTOMER'.

WA_FIELDCAT-REF_FIELD = 'ZC_CUSTOMER'.

WA_FIELDCAT-REF_TABLE = 'ZCP_DEMAND_SYS'.

WA_FIELDCAT-reptext = 'CUSTOMER'.

  • WA_FIELDCAT-seltext = 'OPERATION DESCRIPTION'.

WA_FIELDCAT-LOWERCASE = 'X'.

WA_FIELDCAT-outputlen = '10'.

*

*WA_FIELDCAT-QUANTITY = ` 'X'.

  • WA_FIELDCAT-EDIT = ' '.

APPEND WA_FIELDCAT to I_FIELDCAT.

WA_FIELDCAT-col_pos = 3.

WA_FIELDCAT-fieldname = 'ZC_PO'.

WA_FIELDCAT-REF_FIELD = 'ZC_PO'.

WA_FIELDCAT-REF_TABLE = 'ZCP_DEMAND_SYS'.

  • WA_FIELDCAT-QUANTITY = 'X'.

WA_FIELDCAT-reptext = 'PO'.

  • WA_FIELDCAT-seltext = 'ACTIVITY'.

WA_FIELDCAT-LOWERCASE = 'X'.

WA_FIELDCAT-outputlen = '10'.

  • WA_FIELDCAT-EDIT = ' '.

APPEND WA_FIELDCAT to I_FIELDCAT.

WA_FIELDCAT-col_pos = 4.

WA_FIELDCAT-fieldname = 'ZC_PO_TYPE'.

WA_FIELDCAT-REF_FIELD = 'ZC_PO_TYPE'.

WA_FIELDCAT-REF_TABLE = 'ZCP_DEMAND_SYS'.

  • WA_FIELDCAT-QUANTITY = 'X'.

WA_FIELDCAT-reptext = 'PO_TYPE'.

  • WA_FIELDCAT-seltext = 'ACTIVITY DESCRIPTION'.

WA_FIELDCAT-LOWERCASE = 'X'.

WA_FIELDCAT-outputlen = '10'.

  • WA_FIELDCAT-EDIT = ' '.

APPEND WA_FIELDCAT to I_FIELDCAT.

WA_FIELDCAT-col_pos = 5.

WA_FIELDCAT-fieldname = 'ZC_PART'.

WA_FIELDCAT-REF_FIELD = 'ZC_PART'.

WA_FIELDCAT-REF_TABLE = 'ZCP_DEMAND_SYS'.

  • WA_FIELDCAT-QUANTITY = 'X'.

WA_FIELDCAT-reptext = 'PART'.

  • WA_FIELDCAT-seltext = 'LOCATION'.

WA_FIELDCAT-outputlen = '10'.

WA_FIELDCAT-LOWERCASE = 'X'.

  • WA_FIELDCAT-F4AVAILABL = 'X'.

**WA_FIELDCAT-EDIT = ' '.

APPEND WA_FIELDCAT to I_FIELDCAT.

WA_FIELDCAT-col_pos = 6.

WA_FIELDCAT-fieldname = 'ZC_SCH_DATE'.

WA_FIELDCAT-REF_FIELD = 'ZC_SCH_DATE'.

WA_FIELDCAT-REF_TABLE = 'ZCP_DEMAND_SYS'.

  • WA_FIELDCAT-QUANTITY = 'X'.

WA_FIELDCAT-REPtext = 'SCH_DATE'.

  • WA_FIELDCAT-seltext = 'RESOURCE'.

WA_FIELDCAT-LOWERCASE = 'X'.

WA_FIELDCAT-outputlen = '10'.

  • WA_FIELDCAT-F4AVAILABL = 'X'.

*WA_FIELDCAT-EDIT = ' '.

APPEND WA_FIELDCAT to I_FIELDCAT.

WA_FIELDCAT-col_pos = 7.

WA_FIELDCAT-fieldname = 'ZC_QTY_PO'.

WA_FIELDCAT-REF_FIELD = 'ZC_QTY_PO'.

WA_FIELDCAT-REF_TABLE = 'ZCP_DEMAND_SYS'.

  • WA_FIELDCAT-QUANTITY = 'NOS'.

WA_FIELDCAT-REPtext = 'QTY_PO'.

  • WA_FIELDCAT-seltext = 'BUCKET CONSUMPTION'.

WA_FIELDCAT-outputlen = '7'.

  • WA_FIELDCAT-DATATYPE = 'X'.

  • WA_FIELDCAT-F4AVAILABL = ' '.

  • WA_FIELDCAT-EDIT = ' '.

APPEND WA_FIELDCAT to I_FIELDCAT.

***********************

WA_FIELDCAT-col_pos = 8.

WA_FIELDCAT-fieldname = 'ZC_QTY_PLN'.

WA_FIELDCAT-REF_FIELD = 'ZC_QTY_PLN'.

WA_FIELDCAT-REF_TABLE = 'ZCP_DEMAND_SYS'.

  • WA_FIELDCAT-QUANTITY = 'NOS'.

WA_FIELDCAT-REPtext = 'QTY_PLN'.

  • WA_FIELDCAT-seltext = 'BUCKET CONSUMPTION'.

WA_FIELDCAT-outputlen = '7'.

WA_FIELDCAT-DATATYPE = 'X'.

*

  • WA_FIELDCAT-F4AVAILABL = ' '.

*WA_FIELDCAT-EDIT = 'X'.

APPEND WA_FIELDCAT to I_FIELDCAT.

CALL METHOD grid->set_table_for_first_display

EXPORTING

  • i_save = 'A'

  • I_STRUCTURE_NAME = 'ZCP_DEMAND_SYS'

is_lAYOUT = GS_LAYOUT

CHANGING

IT_OUTTAB = IT_ZCP_DEMAND_SYS1

IT_FIELDCATALOG = I_FIELDCAT.

Read only

0 Likes
3,105

Hi Udit,

please search for How to post code

Regards,

Clemens

Read only

0 Likes
3,105

... and if you just do not follow that:

at least create a dictionary structure for the alv display table, pass the name with ...first_display. Also make sure that any special fields i.e. for cell color or style that you reference in the layout structure exist in the table structure.

Your trouble will not end too soon. The solution is ready within 15 minutes.

Regards,

Clemens

Read only

0 Likes
3,105

Hi Clemens,

Thanx for your response. I am not able to follow what you mean to say, can you please elaborate it with an example, as how I need to implement your suggestion.

Thanks in advance.

Read only

0 Likes
3,105

Hi Experts, I am using method set_table_for_first_display, CNTL->ERROR is coming because of passing fieldcatalog to the method, If i comment fieldcatalog in method grid is displayed but without fieldcatalog. Pls note: This code(for ALV) is written in a Zreport, and this Zreport is called inside a user-exit. data:

lt_celltab TYPE lvc_t_styl,

l_index TYPE i.

CLEAR :I_FIELDCAT,I_FIELDCAT[],WA_FIELDCAT.

WA_FIELDCAT-col_pos = 1.

WA_FIELDCAT-FIELDNAME = 'ZC_SUPPLIER'.

WA_FIELDCAT-REF_FIELD = 'ZC_SUPPLIER'.

WA_FIELDCAT-REF_TABLE = 'ZCP_DEMAND_SYS'.

WA_FIELDCAT-reptext = 'SUPPLIER'.

  • WA_FIELDCAT-QUANTITY = 'X'.

  • WA_FIELDCAT-seltext = 'OPERATION'.

WA_FIELDCAT-outputlen = '9'.

  • WA_FIELDCAT-EDIT = ' '.

APPEND WA_FIELDCAT to I_FIELDCAT.

CALL METHOD grid->set_table_for_first_display

EXPORTING

  • i_save = 'A'

  • I_STRUCTURE_NAME = 'ZCP_DEMAND_SYS'

is_lAYOUT = GS_LAYOUT CHANGING

IT_OUTTAB = IT_ZCP_DEMAND_SYS1

IT_FIELDCATALOG = I_FIELDCAT.

Read only

caner_genis
Explorer
0 Likes
3,105

Hi Udit.

Can you use FM "REUSE_ALV_GRID_DISPLAY" instead of class ALV.

I advise to not use SUBMIT command. You can create a FM in SE37 and you can use it in the user-exit.

Regards.

Caner.

Read only

Clemenss
Active Contributor
0 Likes
3,105

Hi,

if you don't know how to create a dictionary structure and how to pass it to the grid and how to read the documentation, I'm very sorry I can't help you.

Regards,

Clemens