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: 

All fields in ADRC Table in a Single Column

abhishek37373
Participant
0 Kudos

Hi Folks,

I have requirement to show all fields of ADRC (BUILDING,FLOOR,ROOMNUMBER..etc) in a Single column of ALV for each line item.

Please suggest some solution as i am able to decide what should be the type of fields which will contains multiple line item (Multiple Fields of ADRC) and further process.


Thanks in Advance


-Abhishek Agarwal

16 REPLIES 16

kaushalya
Active Participant
0 Kudos

Hi Abhishek,

First you need to retrieve the necessary fields from ADRC and then concatenate multiple fields (BUILDING, FLOOR, ROOMNUMBER) into a single field and display on ALV grid.

0 Kudos

Hi ,

Concatenation of multiple fields is okay but from what is know there is a limitation of characters in ALV cell,Also i need every field to be in different line in a line item.

0 Kudos

Hi Abhishek,

I think, we can show upto 128 characters in ALV Column. These three columns length (20 + 10 + 10) = 40) is suitable to show in alv.

Use concatenate statement, merge the string and show it in ALV Report.

CONCATENATE BUILIDING FLOOR ROOMNUMBER INTO L_STR SEPERATED BY ','.


Inside Single Cell multiple line, is not possible. I hope Word-wrap functionality won't work here.

Regards

Rajkumar Narasimman

Message was edited by: Rajkumar N

0 Kudos

Hi ,

Thanks for the help but I need to concatenate almost all fields on ADRC i used the BUILDING, FLOOR, ROOMNUMBER only as a n example of fields in ADRC (I guess u missed the "etc" ..written..:) )

0 Kudos

Hi Abhishek,

The requirement is nothing but Word wrap functionality. Using REUSE_ALV_LIST_DISPLAY, we display the same using FM RKD_WORD_WRAP.

Kindly check the link below.

Regards

Rajkumar Narasimman

0 Kudos

Are you sure it won't create any line item,that is "Inside Single Cell multiple line"..will it be possible using FM RKD_WORD_WRAP.

0 Kudos

Hi Abhishek,

Inside single cell, it is not possible. I hope you can find the same in the document too.

But using this way we can show the address information line by line as required.  128 characters is the maximum possibility in ALV.


857823 - ALV grid: Strings with a maximum of 128 characters


Regards


Rajkumar Narasimman

0 Kudos

Thanks,Hoping it will Work as required..:)

Former Member
0 Kudos

hii abhishek

use concatenate for this but make sure there should not be any integer or float type field

Regards

Gaurav

Former Member
0 Kudos

Abhishek Agarwal wrote:

in a Single column of ALV for each line item

0 Kudos

Thanks for the response but the requirement is somewhat different.

Former Member
0 Kudos

hii abhishek

define internal table of type  string

and then u can concatenate all the data into it.

this is what i did with vbrk table.. my req is to send data for external system and i have to generate csv file using dataset.

data: it_data type table of string,
       wa_data type string.

concatenate it_vbrk-mandt it_vbrk-vbeln it_vbrk-fkart it_vbrk-fktyp it_vbrk-vbtyp it_vbrk-waerk it_vbrk-vkorg it_vbrk-vtweg it_vbrk-kalsm
       it_vbrk-knumv it_vbrk-vsbed it_vbrk-fkdat it_vbrk-belnr it_vbrk-gjahr it_vbrk-poper it_vbrk-konda
       it_vbrk-kdgrp it_vbrk-bzirk it_vbrk-pltyp it_vbrk-inco1 it_vbrk-inco2 it_vbrk-expkz it_vbrk-rfbsk  it_vbrk-mrnkz
       itkurrf it_vbrk-cpkur it_vbrk-valtg it_vbrk-valdt it_vbrk-zterm it_vbrk-zlsch it_vbrk-ktgrd it_vbrk-land1
       it_vbrk-regio  it_vbrk-counc it_vbrk-cityc it_vbrk-bukrs it_vbrk-taxk1 it_vbrk-taxk2 it_vbrk-taxk3 it_vbrk-taxk4
       it_vbrk-taxk5 it_vbrk-taxk6 it_vbrk-taxk7 it_vbrk-taxk8 it_vbrk-taxk9 itnetwr it_vbrk-zukri it_vbrk-ernam
       it_vbrk-erzet it_vbrk-erdat it_vbrk-stafo it_vbrk-kunrg it_vbrk-kunag it_vbrk-maber it_vbrk-stwae it_vbrk-exnum
       it_vbrk-stceg it_vbrk-aedat it_vbrk-sfakn it_vbrk-knuma it_vbrk-fkart_rl it_vbrk-fkdat_rl it_vbrk-kurst
       it_vbrk-mschl it_vbrk-mansp  it_vbrk-spart it_vbrk-kkber it_vbrk-knkli it_vbrk-cmwae itcmkuf it_vbrk-hityp_pr
       it_vbrk-bstnk_vf it_vbrk-vbund it_vbrk-fkart_ab it_vbrk-kappl it_vbrk-landtx it_vbrk-stceg_h it_vbrk-stceg_l it_vbrk-xblnr
       it_vbrk-zuonr itmwsbk it_vbrk-logsys it_vbrk-fksto it_vbrk-xegdr it_vbrk-rplnr  it_vbrk-lcnum it_vbrk-j_1afitp  it_vbrk-kurrf_dat
       it_vbrk-akwae  itakkur it_vbrk-kidno it_vbrk-bvtyp it_vbrk-numpg it_vbrk-bupla it_vbrk-vkont it_vbrk-fkk_docstat it_vbrk-nrzas
       into wa_data separated by ','.




hope this is helpful


Regards

Gaurav

0 Kudos

Okay Gaurav will try that and hope they is no problem with the limitation of ALV cell.

0 Kudos

Hi Abhishek,

It can not be possible to show characters more than 128 in ALV grid cell, instead of you generate the report as CSV in application server using Open dataset. Run that program and will generate the report in application server.

Now make another one program ZEXTRACT which will extract the file in frontend as excel file.

If you want help in ZEXTRACT, then will guide you.

Many Thanks / Himanshu Gupta

Former Member
0 Kudos

hii abhishek

i did it for bseg and mseg tables as well so for no problem to me hope you also able to solve your problem through it.

Regards

Gaurav

raymond_giuseppi
Active Contributor
0 Kudos

Did you consider using a FM as ADDRESS_INTO_PRINTFORM to get some shortest text for address (This one will return 1-10 lines of formatted lines depending on country address rules)

Regards,
Raymond