cancel
Showing results for 
Search instead for 
Did you mean: 

Infoset and retrieving data from program

former_member253761
Discoverer
0 Kudos

Hi,

i am hoping someone can help me here.

I want to create a customer credit report with with aging buckets using the infoset query (SQ01-03 tcodes). Within the infoset i would like to have data coming from 2 different sources, on one side i would like to have table joins using basis tables (customer credit information such as exposure and credit limit) and on the other side for the aging i would like the amounts sorted into the aging buckets (0-30, 31-60, etc) to be provided by an existing Z program for aging by customer.

Is this possible via query or ABAP programing is needed? If possible via infoset query can you please advise how to link the current infoset to the existing program (should data structure be defined before hand?)

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

AntonFarenyk
Contributor
0 Kudos

Alexey - With all of my due respect, I’m not sure if LDB would be appropriate in this case.

Michal,

Your idea seems very doable to me. You will need some ABAP code in Infoset that’s for sure.

In an existing infoset (assuming it already contains all your required tables and join is done properly and works fine) I would add additional field(s) or additional structure either via LIKE reference from DDIC or described in the same manner as returned by your home-made Z program. In code section I would then call your Z program properly and populate results directly or via temp structure or field(s) depending of what type of program it is.

In my simple example above I wanted to carefully retrieve BSEG (can't be used in SQ02 join btw) only under certain conditions, so I added it as additional structure along with some other additional fields.

If you’re unfamiliar with  additional field / structure in SQ02 please search on SCN for more detailed «how-to» and be careful as impact on DB could be significant if code is not optimized.

Best regards,

Anton

former_member253761
Discoverer
0 Kudos

Anton,

thanks for your suggestion and the example. much appreciated!

Answers (2)

Answers (2)

Jelena
Active Contributor
0 Kudos

As Anton said, you can add ABAP code to the infoset. I'd suggest to avoid calling any external programs though. Sorting the values into the buckets is not a complex task and you can put the code directly into the infoset.

There are many blogs/documents about the queries on SCN. Here is a good starting point:

former_member253761
Discoverer
0 Kudos

Hi Jelena, thanks for the tip, i found the link very useful. BR

Former Member
0 Kudos

Hi,

Even if you be able to that in SQ* you need to use abap, and I think you need to create you own logical data base... In my opinion it's easy to write abap report instead