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: 

Output in field is converted and longer than field definition.

0 Kudos

Hello.

We have an ALV-Table with a field NUMC, lengh = 6. The content of the field is a key "02". There exists a conversion table where the 02 gets to text "XXXXXXXXXX". See attachment.

In the dynpro ALV displays the text and I have no idea how this happens.

Does anybody know?

Best regards

Gerhard

1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor
0 Kudos

It's programmed through:

1) the field catalog: DRDN_HNDL, DRDN_FIELD, DRDN_ALIAS, OUTPUTLEN

2) the method SET_DROP_DOWN_TABLE (of cl_gui_alv_grid)

Search the forum for more information (and the must: An Easy Reference For ALV Grid Control -> http://scn.sap.com/docs/DOC-10353 )

8 REPLIES 8

former_member226239
Contributor
0 Kudos

May be the text "XXXXXXXXX" you are seeing is related to value (in key - value pair).

If that is not the case then I guess you are checking some thing wrong here as the field is of type NUMC and length is 6, in this case you should not be seeing anything other than numbers (0 to 9) in that field.

-Chandra

silver1
Explorer
0 Kudos

Hi Gerhard,

I guess the field catalog of the NUMC field has been changed to character in output. Please check.

Regards,

Silver

Sandra_Rossi
Active Contributor
0 Kudos

It's programmed through:

1) the field catalog: DRDN_HNDL, DRDN_FIELD, DRDN_ALIAS, OUTPUTLEN

2) the method SET_DROP_DOWN_TABLE (of cl_gui_alv_grid)

Search the forum for more information (and the must: An Easy Reference For ALV Grid Control -> http://scn.sap.com/docs/DOC-10353 )

0 Kudos

Hello.

I've done

and

and the result is

but I expected to see "Test ADVSLK".

What did I wrong?

Best Regards

Gerhard

alessandroieva
Active Participant
0 Kudos

Hi,

for display the internal value plus text you set a flag like below image:

Let me know,

AI

Sandra_Rossi
Active Contributor
0 Kudos

You also have demo programs to help you: BCALV_TEST_GRID_F4_HELP and BCALV_EDIT_07.

It's also possible that you need to empty the ALV buffer -> program BALVBUFDEL (it buffers some element of the field catalog)

0 Kudos

Hello.

The solution was:

        LS_FCAT-OUTPUTLEN = '60'.
        LS_FCAT-CONVEXIT = 'ZCONS'.

Thank's for your help.


Best Regards.


Gerhard

Jelena
Active Contributor
0 Kudos

Thanks for sharing the solution. Kindly close the discussion, see this blog: