cancel
Showing results for 
Search instead for 
Did you mean: 

0FI_AR_4 Enhancement

Former Member
0 Kudos

Hi ,

I am new to ABAP.

I want to enhance the data source 0FI_AR_4,We dont have the field KUNAG(Sold to Party) which is available in ( 2LIS_13_VDKON) VBRK  Table

Hence i have lookup the field  with ZUONR(Assignment) from BSID Table, I want write a logic like this SELECT KUNAG From VBRK where VBRK-ZUONR=BSID-ZUONR.

Can you please provide same logic for this enhance

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member182516
Active Contributor
0 Kudos

Hi Reddy,

You can compare BELNR of VBRk with your extract structure and get the sold-to-party.

If you are novice in ABAP take help of ABAP persons help...

Please refer to the below code,


DATA: l_t_fiar TYPE TABLE OF DTFIAR_3 WITH HEADER LINE,
           l_t_fiar_idx TYPE sy-tabix.

   WHEN '0FI_AP_4'.
     LOOP AT c_t_data INTO l_t_fiar.
       l_t_fiar_idx = sy-tabix.

       SELECT SINGLE KUNAG
               FROM VBRK
               INTO (l_t_fiar-zzkunag)

WHERE  belnr = l_t_fiar-belnr.

MODIFY c_t_data FROM l_t_fiar INDEX l_t_fiar_idx.
     ENDLOOP.

Give a try with the above code in your sandbox or development system and reconcile the data.

Regards

KP

Former Member
0 Kudos

Hi Prashanth,

BELNR is a empty value of table  VBRK.


Thanks,

Mohan

former_member186399
Active Contributor
0 Kudos

Dear Mohan

For AR enhancement you need not link BSID Zounr, ZOUNR will be a part of the data range from the souce itself, you cal look up ZOUNR into  VBRK VBELN to get the customer. Ask the users to maintain sales document in ZOUNR so that the look up to VBRK becomes easier.

Regards

Gajesh

Former Member
0 Kudos

Hi,

Finally I have written sample code as per My Enhancement.Can some one validate this.

DATA : S_DTFIAR_3 LIKE  DTFIAR_3

DATA: ZKUNAG Like VBRK-KUNAG.

When '0FI_AR_4'.

Loop at C_T_DATA into S_DTFIAR_3.

Select * From VBRK

Where ZUONR =S_DTFIAR_3-ZUONR.(*BSID-ZUONR)

If sy-subrc eq 0.

MOVE:VBRK-KUNAG to S_DTFIAR_3-ZKUNAG

ENDIF.

MODIFY  C_T_DATA FROM S_DTFIAR_3.

ENDLOOP.

Thanks,

Mohan

RamanKorrapati
Active Contributor
0 Kudos

do the syntax check,activate it. Run your extractor at RSA3. that will give you the clear pic. whether its working perfect or not.

Regarding abap you always better to check at abap forums rather than bw forum.

RamanKorrapati
Active Contributor
0 Kudos

can you search form Google. Data source enhancement.

you may get useful docs. from them you may get basic idea how to write logic.

Former Member
0 Kudos

Hi,

Can some one help me.

Thanks,

Mohan