on 01-08-2014 1:40 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
can you search form Google. Data source enhancement.
you may get useful docs. from them you may get basic idea how to write logic.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.