2013 Dec 26 9:36 AM
Hi,
My requirement is in VOFM routine how we can write the message after the last line item is completed in VA01. Means the routine is triggering every line item created in sales order , so how we know that last line item is triggered so i can pass my message there.
Hi,
My requirement is in VOFM routine how we can write the message after the last line item is completed in VA01. Means the routine is triggering every line item created in sales order , so how we know that last line item is triggered so i can pass my message there.
2013 Dec 26 9:56 AM
Hi Rajeev,
lets say you have line items in table ITAB.
describe ITAB lines lv_lines.
loop at ITAB.
<your routine>
if sy-tabix = lv_lines.
<your message>
endif.
endloop.
This applies only if you are processing line items for one salesorder.
Let me know if you face any difficulty here.
Thanks,
bhaskar
Message was edited by: bhaskar doppalapudi
2013 Dec 26 10:04 AM
Hi,
Pls give message in routine MV45AFZZ instead of routine in VOFM.
In VOFM, you just check your condition and put SY-SUBRC = 0 or 4.
And put your message part in MV45AFZZ.
Logic..
Data: V_LINE type I.
Describe table I_VBRP lines V_LINE.
Loop at I_VBRP.
if sy-tabix = V_LINE.
Check you condition here.......................
Message(............................)
endif.
ENDLOOP.
Thanks and Regards
Srimanta
2013 Dec 26 10:33 AM
Hi Rajeev,
In this case you can't control through the VOFM! better to control the user-exit MV45AFZZ
FORM USEREXIT_SAVE_DOCUMENT_PREPARE.
descrbe it XVBAP[] LINES
LOOP AT XVBAP.
check the last line
*message
ENDLOOP.
ENDFORM.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |