cancel
Showing results for 
Search instead for 
Did you mean: 

How to create new records and append them in result package?

Former Member
0 Kudos

Hello Experts,

I have a requirement like this:

1.Firstly we will be having a record(marked in blue) like this in result package.

2.Then based on the Range From and Range To values we need to look up values which lies with that range from q-table of master data 0COSTELMNT.

3.If record is found append the same as new records(marked in red) in the same result package.

I have created an internal table all the data of q-table.Now how can we compare the stored values of internal table which lies in between Range From and Range To of result package  and populate the same as new records in the same result package?

Please help.

ID   

InfoObject

   

Node name

   

Level

   

Range From

   

Range To

6.0   

0HIER_NODE

   

COGBV11110 001

6   

COGB0000401100

   

COGB0000401112

6.1   

0COSTELMNT

   

COGB0000401101

6
6.2   

0COSTELMNT

   

COGB0000401104

6
6.3   

0COSTELMNT

   

COGB0000401108

6
6.4   

0COSTELMNT

   

COGB0000401110

6

Thanks and Regards,

Soumya Roy.

Accepted Solutions (0)

Answers (1)

Answers (1)

RafkeMagic
Active Contributor
0 Kudos

not sure if I understand your problem, but here's how I would approach it

fill your q-table

determine the size of your result_package before starting

next, you loop your result_package

have an exit clause for records > size (determined before the loop)

for each entry, you then loop your q-table to look for entries that fall between the interval

you then add a new entry to the result_package (making sure you do so according to OSS note 1223532 for each corresponding entry of your q-table

free memory (your q-table is no longer necessary)

Former Member
0 Kudos

Thanks for the reply

Can you please provide a pseudo-code as I am totally new in BI and ABAP.

It will be quite helpful.

Thanks and Regards,

Soumya Roy