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

Pricing condition routine problem in VOFM

Former Member
0 Likes
815

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.

3 REPLIES 3
Read only

Former Member
0 Likes
702

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

Read only

Former Member
0 Likes
702

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

Read only

Former Member
0 Likes
702

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.