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

Question about infoset query with code

Former Member
0 Likes
709

Hi experts.

I always appreciate your help. Today, I have some problem. I made infoset query using SQ01 and got some data. Those data include WBS no but some of them didn't. So I tried to put some code into the infoset query that any data has not WBS has some value, for example 'X', in WBS no field.

I needed to know what field or table I should control to display value 'X' in WBS no field in case that WBS field has no value.

I tried to put code at "END-OF-SELECTION(before display)" and control %dtab. But I met error message there is no such table %dtab. So, I define %dtab then during runtime, I also met error message %dtab has already been defiend.

How can I do? Is it impossible thing?? I'm wating for your answer.

regards.

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
573

Hi, if you just want to fill the field if it is blank, you can do this in the Record Processing Section.

I'm not familar with the WBS number, so for this example, I will fill the BISMT in MARA during the "Recording Processing" Section.

if mara-bismt is initial.
 mara-bismt = 'X'.
endif.

Regards,

Rich Heilman

3 REPLIES 3
Read only

Former Member
0 Likes
573

Instead of updating program, you can update infoset which is used. I assume you have created custom infoset for your query. We can add ABAP routines in Infoset. Have you tried this option? If you click on EXTRAS in infoset, you can add new fields. Add a custom field which will be populated with text or so 'No WBS Element', if there is no WBS element. You can write a small ABAP routine for this. This is one option for you.

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
574

Hi, if you just want to fill the field if it is blank, you can do this in the Record Processing Section.

I'm not familar with the WBS number, so for this example, I will fill the BISMT in MARA during the "Recording Processing" Section.

if mara-bismt is initial.
 mara-bismt = 'X'.
endif.

Regards,

Rich Heilman

Read only

0 Likes
573

In the infoset, right click on the node which represents the table which you want to work with. THis is on the left hand side. Right click on it and choose, "Code for Record Process", In the right hand side of the screen, you should now see an editor. Here is where you can put your code to modify the field. You can access the field directly like I've done above.

REgards,

Rich Heilman