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

repeat output automatically in changes sales order

Former Member
0 Likes
4,305

HI all,

I need to resend an output ZEDI whenever the sales order is CHANGED based on customer number, change in quantity, price and rejection code. The ZEDI output is created when the order is saved. My thinking is that i would need to write a requirement for this. The ZEDI is using requirement 2 now. However, i am going to create a new requirement, put those codes from reqmnt 2 and apply to the new requirement. Do you have any suggestions how i can check the changes for quantity changes, price changes and rejection code ? Will it work with the new requirement ?

thanks

Joyce

1 ACCEPTED SOLUTION
Read only

brad_bohn
Active Contributor
0 Likes
2,944

You can do that with a requirement or the output program. If you're using RSNASTED as the output program though, go with the requirement. The difference in approach is whether you want to stop the proposal of the output or whether you want to propose it and just log that no relevant changes were made before flagging the output as completed (without dispatch). With the requirement and immediate processing, you will need to check for changes by accessing the global memory fields/tables in SAPMV45A using field symbols - for example, by comparing values in XVBAP[] and YVBAP[] in change mode.

HI all,

I need to resend an output ZEDI whenever the sales order is CHANGED based on customer number, change in quantity, price and rejection code. The ZEDI output is created when the order is saved. My thinking is that i would need to write a requirement for this. The ZEDI is using requirement 2 now. However, i am going to create a new requirement, put those codes from reqmnt 2 and apply to the new requirement. Do you have any suggestions how i can check the changes for quantity changes, price changes and rejection code ? Will it work with the new requirement ?

thanks

Joyce

11 REPLIES 11
Read only

vimalv
Active Participant
0 Likes
2,944

In V/30 make sure for your Output Type, Multiple issuing is checked.

Then it will trigger for changes as well.

Read only

Former Member
0 Likes
2,944

Hi Vimal,

I have to use that but it is issuing output too much.

thanks

Joyce

Read only

brad_bohn
Active Contributor
0 Likes
2,945

You can do that with a requirement or the output program. If you're using RSNASTED as the output program though, go with the requirement. The difference in approach is whether you want to stop the proposal of the output or whether you want to propose it and just log that no relevant changes were made before flagging the output as completed (without dispatch). With the requirement and immediate processing, you will need to check for changes by accessing the global memory fields/tables in SAPMV45A using field symbols - for example, by comparing values in XVBAP[] and YVBAP[] in change mode.

Read only

Former Member
0 Likes
2,944

hi Brad,

I am using RSNASTED as the output program. I am also using a new requirement. In the requirement, i don;t have any data for KOMPBV1. Can you pls provide an example to access global memory using field symbols ? Once i can get the price changes,etc, how i can i stop the output from being processed ?

Thanks.

Joyce

Read only

brad_bohn
Active Contributor
0 Likes
2,944

In a requirement, to allow the output proposal, set SY-SUBRC = 0. To stop the output proposal, set SY-SUBRC = 4. In your case, the best approach is to set SY-SUBRC = 4 until you find a condition that should trigger the output, then set SY-SUBRC = 0. Be aware of DB selections and other actions that change the value of SY-SUBRC or use a local variable to assign the value at the end of the routine (see examples in your system).

For price changes, the easiest way is to analyze a net value change or a subtotal field change, rather than trying to access individual conditions.

Here is a field symbol usage example for sales order items (you need to do this for XVBAP and YVBAP in change mode (T180-TRTYP = 'V'), then loop/compare the items:


  DATA : lv_fieldname  TYPE fieldname.

  DATA : lt_xvbap TYPE STANDARD TABLE OF vbapvb,
         ls_xvbap TYPE vbapvb.

  FIELD-SYMBOLS: <fs_xvbap> TYPE ANY.

  lv_fieldname = '(SAPMV45A)XVBAP[]'.

* Get the Order Items
  ASSIGN (lv_fieldname) TO <fs_xvbap>.
  IF sy-subrc EQ 0.
    lt_xvbap = <fs_xvbap>.
  ENDIF.

Read only

Former Member
0 Likes
2,944

Hi Brad,

Thanks for your helpful info. I am trying to look at the net values changes which make it a lot easier.

Do you think i still need the multiple Issue ? When i remove the multiple issue, no output is repeated.

In this case, i may have to create an output in requirement. Would it be better with mutliple issue then ?

thanks

Joyce

Read only

brad_bohn
Active Contributor
0 Likes
2,944

Yes, you must use 'multiple issue' in addition to a requirement to stop the output when it's not needed.

Read only

Former Member
0 Likes
2,944

Hi Brad,

Without the multiple issue, it is hard to add an output. I am continuing to look at the changes.

Appreciate your guidance on this.

thank you !

Joyce

Read only

Former Member
0 Likes
2,944

still waiting for replies.

Read only

Former Member
0 Likes
2,944

thank you to those who replied.

Read only

0 Likes
2,944

Hi Chan ,

I also have the same requirement that whenever a sale order quantity change i want to reissue output .

For the i have select 'Multiple Issuing' check box , now i want to retrict the output generation so what process

i will follow should i create new requirement type or can you tell me what is that Change Ouput option in multiple issuing

screen to give Program name and Routine name what it will do ?

what approch i will follow wheather i will create requirement type and attach it to output type or use Program name and

Routine name for Change Ouput option in multiple issuing .

Regards ,

Nilesh Jain .