on 05-18-2005 9:13 AM
Hi Frens ,
I am having one query .
Idoc to be issued everytimes changes occur in a sales order.
May be from VA02 or may be from end user's program.
can i use cdhdr or cdpos table in my requirement (VOFM).
or is there any fields are available in communication structre ( kompbv1 , komkbv1) OR is there any other way to do it .
Thanx and regards,
Hi,
Any Change at Document Level will generate a OUTPUT type.
If still want to handle explicity , you can append the Communication Structure and fill the appended fields , The routines and user exits for assigning values to the new fields are found in the programs RVCOMFZZ, RVCOMFZ1, RVCOMFZ4, and LVCOMFZ1).
Rgds,
Manohar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amitav,
I repost here in case you are not watching both threads. Please feel free to reward both answers!!
Hi Amitav,
This is a tricky one.
There is a field that it set within SAPMV45A processing (r185d-dataloss) which is set to X if a standard SAP field hase been changed in the order.
So, here is what I would suggest you do:
1. set up your output condition type as 'multiple issueing'. This will ensure that every time you go into change a sales order the output type is proposed
2. In the userexit USEREXIT_SAVE_DOCUMENT_PREPARE I would export to memory (using the sales order number as the key) the value of r185d-dataloss
3. In your requirement import from memory the value of the field r185d-dataloss (clearing the memory entry afterwards)
4. If the value is X then pass the requirement, otherwise fail it
This way, your requirement will always reject the output type until the document is saved. If it is saved and there were changes, during update processing the requirement will pass and the output will be generated.
If you want to avoid IMPORT/EXPORT from memory then you could use the technique described in my blog: /people/brad.williams/blog/2005/04/25/userexits--how-do-i-access-inaccessible-data
Hope that that makes sense.
Cheers,
Brad
Hi ,
Even though i am not changing any thing in VA02, but selecting the line at the item level , and saving it , idoc is created.
while selecting a line , The value of
r185d-dataloss = 'x' .
how to restrict this .
Should we use change pointer for my message type.
But i am issuing idoc using message control with output type ( zcre , zchg , zcan , zcom).
Needeed help in this regards.
Thanx and Regards,
Hi Brad ,
I am writing all the code in requirements only.
I didnt write any user exit related to this.
But in userexit_save_document_prepare , one include is there . But is coded by somebody else.
CONSTANTS C_PROGRM_VARIABLE(15) TYPE C VALUE '(SAPMV45A)R185D'.
FIELD-SYMBOLS <FS_R185D> LIKE R185D.
ASSIGN (C_PROGRM_VARIABLE) TO <FS_R185D>.
IF <FS_R185D>-DATALOSS NE 'X'.
MOVE '4' TO SY-SUBRC.
ELSE.
needed help.
Hi Amitav,
To start, you would need to check xvbap-updkz ne 'I' (insert) 'D' (delete) 'U' (update).
But this would just be for line item changes. You can have changes to the header (VBAK), to schedule lines (XVBEP), to header status (VBUK) to line item status (xvbup) and so on.
BUT, if your functional requirement is only for line item data changes, then you could check the xvbap-updkz in the USEREXIT_SAVE_DOCUMENT_PREPARE and either set your own global variable (and access in the requiremenet with field symbol and dynamic assign) or use export/import from memory.
Cheers,
Brad
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
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.