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

ABAP Query

Former Member
0 Likes
615

Hi,

I have to create one query based on Automatic Paymen Programe. I can get all the information through REGUP & REGUH Tables. but the thing is i can't join REGUP table with any other tables.

Is there any way i can get the information of REGUH table? Is there any Logical database available or How i can write any ABAP code in ABAP query?

Please help me with this issue.

I'll really appreciate your time and help.

Thanks & Regards,

Niki Shah.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
580

you can create "Addition Fields" in your query. Put Field Code(ABAP) behind them to populate them with whatever data you want.

Otherwise, if it gets too complicated, why not just write a new Z Report?

4 REPLIES 4
Read only

Former Member
0 Likes
581

you can create "Addition Fields" in your query. Put Field Code(ABAP) behind them to populate them with whatever data you want.

Otherwise, if it gets too complicated, why not just write a new Z Report?

Read only

0 Likes
580

Hi,

I really appreciate your time and help. Can you please tell me where i have to put field code ABAP? Like in Functional Group or some where else?

Can you please give me steps in little bit details.

Thanks & Regards,

Niki Shah.

Read only

0 Likes
580

what we did is go to SE38 and create a Subroutine Pool called ZxxxQueryxxx - or whatever.

there you create Forms just like normal ABAP programs contain.

you call these Forms form your Field Code.

For Example we have an Additional Field called ZZ_DT_STATUS where we need to calculate some date value.

In Field Code of that Additional Field we have:

perform f_get_status_date(zhal_spool_query)
                           USING  P0000-BEGDA
                    CHANGING  ZZ_DT_STATUS.

In our Subroutine Pool, we have:

*&--------------------------------------------------------------------*
*&      f_get_status_date
*&--------------------------------------------------------------------*
FORM  f_get_status_date      USING p_begda  TYPE sy-datum
                          CHANGING p_date   TYPE c.

  WRITE p_begda  TO p_date MM/DD/YYYY.

ENDFORM.                    "f_get_status_date

when the qeury is run, it hits this field and branches off to the Subroutine Pool, executes the code and changes the value of our field to reflect that change.

Read only

Former Member
0 Likes
580

Hi Niki,

I am not sure of the ABAP Query, but can recommend to write a Z program using tables BSAK, PAYR etc...

Hope this helps.

Please reward if useful.

Thanks,

Srinivasa