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

Writing Custom code in Adhoc Query

former_member497886
Participant
0 Likes
1,513

Hi All,

Scenario -

I have enhanced a info type say XXXX and added 2 fields in this, say F1 and F2.

The data for these 2 fields are not saved in PAXXXX. It is stored in custom table say T1.

Now I have added these 2 fields in Adhoc query under additional fields, but the data is not getting populated since it is not stored in info type table PAXXXX.

Is there any place to write the custom code for this or is there any other way of doing it.

Please suggest.

Thanks & Regards,

Mohammadi

4 REPLIES 4
Read only

RaymondGiuseppi
Active Contributor
0 Likes
842

Yes, there is such a place

...

When you created the fields, there was a field "Sequence of code", now in menu call Extras if not already done, display tab "code" and add Abap code to select data in "record processing" for this sequence.

Regards,

Raymond

Read only

0 Likes
842

Hi Raymond,

Thanks for reply.

Where exactly this  "Sequence of code" comes, while creating the fields in infotype or adding the fields in Adhoc query.

Thanks,

Mohammadi

Read only

0 Likes
842

Which kind of AdHoc query are you asking for (this term can be used in BI, BW, Web applications, query, Infoset Query,  etc. (or which transaction do you use if easier to answer) - Beware you may be required to access another transaction (e.g. SQ02 for Infoset) to fulfil your requirement.

Regards,

Raymond

Read only

Former Member
0 Likes
842

Hi Mohammadi,

This is achievable, i had a similar requirement plz follow the below steps.

* Go to the field u have created in additional field (in sq02) , then right click and select " Field code".

* Write the abap logic to fetch the details from the custom table(T1 in your case) and pass it to the field (F1 or F2)

* Repeat this for the other field also.

Hope this helps.