01-07-2015 7:54 AM
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
01-07-2015 8:48 AM
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.
01-07-2015 8:53 AM
01-07-2015 9:03 AM
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
01-07-2015 9:10 AM
01-07-2015 9:24 AM
01-07-2015 9:30 AM
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.
01-07-2015 10:02 AM
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
01-07-2015 10:15 AM
01-07-2015 8:56 AM
hii abhishek
use concatenate for this but make sure there should not be any integer or float type field
Regards
Gaurav
01-07-2015 9:02 AM
01-07-2015 9:13 AM
01-07-2015 9:19 AM
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
01-07-2015 9:25 AM
Okay Gaurav will try that and hope they is no problem with the limitation of ALV cell.
01-07-2015 10:46 AM
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
01-07-2015 9:33 AM
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
01-07-2015 9:41 AM
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