cancel
Showing results for 
Search instead for 
Did you mean: 

Original Invoice from Credit for Returns.

former_member461383
Participant
0 Kudos

Dear friends,

Our sales cycle scenario is as follows:

Sales Order (1)-> Delivery (2)-> Billing (3).

Our returns scenario is as follows:

w.r.t Original Billing (3) Return Order is created (4)-> Return delivery (5)-> Credit for returns (6).

Now in the Sales Return report we have column for Credit for Returns (6). We want to add another column for Original Invoice (3). So what logic should I give to ABAP to fetch Original Invoice (3) by giving Credit for returns (6) as input?

Should I go in reverse one- by one through VBFA doc flow table or is there any 1 logic which can fetch original invoice?

Thanks a lot.

Accepted Solutions (0)

Answers (3)

Answers (3)

Jelena
Active Contributor
0 Kudos

In our system the original invoice (3) is available in VBFA for the credit (6). And it is also available in VBRK-ZUONR (Assignment) field. Please be aware that this is customizable, so the safest bet is just to look at the data in your own system.

If you have to use VBFA, make sure that secondary index by subsequent document is active, otherwise the program will take forever to run.

Former Member
0 Kudos

Hi,

    No you should give the input as Return Order is created (4) pass this into VBFA-VBELN and get the VBFA-VBELV of VBFA-VBTYP_N = 'M' try this it can work

Lakshmipathi
Active Contributor
0 Kudos

Now in the Sales Return report we have column for Credit for Returns

We want to add another column for Original Invoice

When you say sales report, have you not considered the original billing document initially ??  If not, ask your ABAPer to consider table VBFA where instead of validating document type, ask them to validate Document Category which should be "M".  By doing so, even at a later date, if you create a new billing type, no need to touching this zee program.  System will take care based on document category.

G. Lakshmipathi