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

Multiple rows to single row

Former Member
0 Likes
452

Hi All,

I have requirement were I need form one row by using ABAP logic for the below format.

Custno. | Adress| House No.|Region| Country |Contact umber

10001 | Mount Road | | | | |

10001 | | 35 | | |

10001 | | | Sounth | |

10001 | | | | US |

10001 | | | | | 925666666

10002 | Ten down| | | | |

10002 | | | | |

10002 | | | North | |

10002 | | | | US |

10002 | | | | | 222298882

I need to make above format in to one row using ABAP logic for each customer for example.

10001 | Mount Road | 35| south|US| 925666666

10002 | Ten down | | North | US| 222298882

How to write logic for this?

Regrds,

T

2 REPLIES 2
Read only

anup_deshmukh4
Active Contributor
0 Likes
405

The below is a raw logic .......please modify according Hope it helps

LOOP AT ITAB.

AT NEW CUSTOMER.

CLEAR <STRING>

ENDAT.

SPLIT ITAB_WA AT '|' INTO TABLE <YOUR tab>

LOOP AT <yourtab>

CONCATINATE FIELD INTO <string>

ENDLOOP.

ENDLOOP.

Read only

Former Member
0 Likes
405

HI,

I wolud like to add the the given anup's logic tat make sure the the cutomer no is the first column in the internal table &

sort the internal table b4 the loop.