New/Change Indicator for Sales Order IDoc
Hi Gurus,
Does anyone knows if there's a field in the IDoc Segment for ORDERS that shows or indicate if it's a new or changed order.
We are sending IDocs to our freight company for sales order, but we are trying to see if there's a way we can let them know if its a new or changed IDoc for sales order.
Is there any field for this or any work around on this?
Thanks for your help.
Segment Field ACTION is not been changed. I've just tested it and made changes to the Sales Order, the ACTION field is still carrying "000".
Like thomas said, can this be because I'm using message type ORDRSP instead of ORDCHG?
Does this make any difference?
Edited by: Basil Balogun on May 10, 2011 4:54 PM
Edited by: Basil Balogun on May 10, 2011 9:43 PM
Similar Messages
-
Change indicator for sales orders
Hi All,
I would like to know when a change is done to a sales order (in VA02), in order to automatically change its status to the default.
Does SAP stores a flag that indicates whether the order was changed?
Thanks!
AmitHi Amit,
Whenever any changes done to any object(eg. Sales Order, Material Master, Customer Master,etc.) in SAP, it is recorded in change document table CDHDR. This table records following important fields,
Object Value
Old Value
New Value
Change date
Time
Transaction(By which changes are done)
So you can find all the changes done to your sales order in this table.
Just Run SE16 >> Table CDHDR >> put your sales order no in field OBJECT VALUE and execute.
I hope this answers your question.
Regards,
Mohit -
Change pointer for Sales Order
Hi,
Using change pointers I want to create an IDOC when ever a specific field in the sales order line item is changed. I have activated the change pointer for message type ORDRSP. Also maintained the following entries in BD52
VERKBELEG(Object) VBAP(Table) ABGRU(field).
After this when I change this field at the sales order line item, it inserts entries into change pointer table.
But my problem is creating IDOC's from those change pointer entries. I am not sure which function module (MASTERIDOC_CREATE_XXXXX) works for this.
Anyhelp on this highly appreciated.
Thanks
RamHi Ram,
I don't think so you can use change pointer for sales order changes. Usually, it is done through transaction code<b> NACE</b> - configuring condition for output type.
You can setup requeirement in procedure control to trigger IDoc ORDRSP for any changes in item level.
Hope this will help you and give an idea.
Regards,
Ferry Lianto -
Create and Change functionality for Sales order
Hii All,
Can any one please suggest me any Standard program or BAPI or IDOC for Sales order, it should cover create as well as change fuctionality of Sales order.
this is very urgent to me.
Suitable Answer will be Rewarded.
Thankyou,
Shobha.For change you can use:
BAPI_SALESORDER_CHANGE Sales order: Change Sales Order
For create you have the following choices:
BAPI_SALESORDER_CREATEFROMDAT1 Sales order: Create Sales Order
BAPI_SALESORDER_CREATEFROMDAT2 Sales order: Create Sales Order
BAPI_SALESORDER_CREATEFROMDATA Create Sales Order, No More Maintenance
BAPI_SALESDOCU_CREATEFROMDATA with business object 'BUS2032'
The difference between the create ones is the functionality you get e.g. create_from_data2 is the 'most powerful' but you also have to provide the most data. It just depends on what you want it to do.
In terms of IDOCS:
message type:
SALESORDER_CREATEFROMDAT201 or
SALESORDER_CREATEFROMDAT202 or
ORDERS05
Hope that helps,
Michael
Here is an example we use, you might want to populate additional fields or leave fields out in case you want different data to be transferred to the IDOC - however some fields are mandatory.
create the order header structure
ls_header-doc_type = ls_screen-order_type.
ls_header-sales_org = gc_vkorg_aa01.
ls_header-distr_chan = gc_distr_aa.
ls_header-division = gc_divis_aa.
ls_header-purch_no = ls_screen-po_num.
ls_header-po_method = ls_screen-po_source.
ls_header-ship_cond = ls_screen-ship_cond.
create partner input table (sold to)
ls_partner-partn_role = gc_role_sold.
ls_partner-partn_numb = ls_screen-sold_to.
APPEND ls_partner TO lt_partner.
create partner input table (ship to)
ls_partner-partn_role = gc_role_ship.
ls_partner-partn_numb = ls_screen-ship_to.
APPEND ls_partner TO lt_partner.
items are added by looping at a table
ls_item-material = <fs_upload>-matnr.
ls_item-req_qty = <fs_upload>-quantity.
process the quantity, it needs to be three decimals, because it
will be moved into a string in the BAPI and divided by 1000 before
it is moved back into a number field (1.500 => 001500 => 1.5)
ls_item-req_qty = ls_item-req_qty * 1000.
truncate remaining decimal places if exist (1.2525 => 1252.5 => 1252 => 1.252)
ls_item-req_qty = trunc( ls_item-req_qty ).
price is taken from the file
ls_item-cond_type = gc_cond_so_upld_price.
ls_item-cond_val1 = <fs_upload>-price.
condition one (price) is multiplied by 10 in the BAPI
ls_item-cond_val1 = ls_item-cond_val1 / 10.
no discount
ls_item-cd_type2 = gc_cond_so_upld_disc.
ls_item-cd_value2 = 0.
ls_item-item_categ = ls_screen-item_cat.
APPEND ls_item TO lt_item.
then BAPI is called
CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA'
EXPORTING
order_header_in = ls_header
business_object = gc_bus_obj
IMPORTING
SALESDOCUMENT = lv_vbeln
RETURN = ls_return
tables
order_items_in = lt_item
order_partners = lt_partner.
IF ls_return-type NE gc_msgty_error AND
ls_return-type NE gc_msgty_abend.
No errors where found
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ELSE.
There was an error or abend
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
ENDIF. -
New Message type for Sales orders
Hi,
We have the message type is ORDSRP(ORDERS05) and Function module IDOC_OUTPUT_ORDRSP for the sales orders.
We have lot of custom fields to be added to the IDoc.
Can any one suggst if it is better extending the current message of create a new one.
Thanks.
Rohita.Hi Rohita,
Instead of changing the standard domain, You have to make the changes in the User Exit.
Say Qualifier 001,002,003 were already there in the domain.
001--Purchase Date
002--Delivery Date
003--Ordered Date
In the user exit u have to just add the segment and the qualifier without making any changes to the Standard Domain.
These Qualifiers are just like other variables and u can add whatever values to them that u want..
You can add Qualifier 004 for Trnasportation Date or Goods issue date and have to communicate the MiddleWare informing that date with this Qualifier will be Transportation Date and they will do the mapping to the corresponding field in other syste.
You can have as many message types as u want for the same IDoc type. There is no harm in having multiple message type. And u dont need to change the standard domain. It can be done without changing the domain.
If u analyse the FM closely u will realise that they have done coding for those values in the domain.
So instead of adding it to domain u just have to do the coding for this new qualifier.
Revert back if u need any help on it.
Thanks...
Message was edited by:
Utsah Garg -
Creating change log for sales order
hi all,
i want to create change log for any given sales order if it exists.
can any one tell me how to do that??Hi Gouri,
CDHDR and CDPOS are the tables for all change history.
CDHDR contains the details such as who made the change, when, using what tcode and the change type ie. update, delete.
CDPOS contains the field name which was changed, its old value and its new value.
The change document object is VERKBELEG for sales documents.
The object value is the SD document number with leading zeros.
The following link will be also useful.
http://www.sap-img.com/ab024.htm
Regards,
Nitin. -
Change status for sales order in crmd_order
Hi,
I am creating a report which has to change for all sales order with status "Open" to status "Processed". Is there any function or bapi to do this ?? Supposing, there is no function, which tables do i have to change ???
thanks in advance!!!
MariaMmmm it doesn't work... I have tried this:
CALL FUNCTION 'CRM_STATUS_CHANGE_EXTERN_OW'
EXPORTING
CHECK_ONLY = ' '
OBJNR = i_crmd_orderadm_h-guid
USER_STATUS = 'I1003'
SET_INACT = ' '
IV_REF_KIND =
IV_OBJECT_TYPE =
IV_NO_1O_MAINTAIN =
IMPORTING
STONR =
EXCEPTIONS
OBJECT_NOT_FOUND = 1
STATUS_INCONSISTENT = 2
STATUS_NOT_ALLOWED = 3
OTHERS = 4.
If sy-subrc = 0.
endif.
But noting has change in tag Status in tx. CRMD_ORDER.. still have in "system status": In process and in "User status": Order Rep Processed.
Thanks in advance !!! -
Change Documents for Sales Order (VA03)
Hello,
Is it possible to track changes to the text (VA03 - Header Detail - Text Tab) from a Sales Order by using change documents?
Thanks in advance for your help,
CLI don't think that is possible. These are getting stored in Longtext (ie STXH & STXL) by retrieving this also we need to use fm READ_TEXT.
and also in change document table CDPOS fields VALUE_NEW & VALUE_OLD have length limit of 254.
a® -
Triggering event through Change Management for Sales order
I am working on three different scenarios of workflow which is triggered on change of sales order. I am trying to put conditions in SWEC for the workflows to start but not sure how to go about it. I created change doc object VERKBELEG and assigned bus2032 and changed as my event. I inserted a value in condition editor like vbap_(fieldname)_new etc. Nothing seem to be working.
I would like to know once we assign event here in SWEC, should we also assign and activate it in the triggering tab of workflow or just create an entry in the linkage table.
Please guide me as to how I need to work on the sales order change. I am basically want to trigger a sales order only when a field value is updated or inserted which pertains to my requirement.
Thank you very much.Karthik,
My problem is still not resolved. I am trying to put something like this. Let me know if you have were able to do this in any other way.
DATA : i_cdhdr LIKE cdhdr OCCURS 0 WITH HEADER LINE.
DATA : lt_editpos LIKE cdshw OCCURS 0 WITH HEADER LINE.
DATA : it_vbap LIKE vbap OCCURS 0 WITH HEADER LINE.
DATA : flag(1) TYPE c.
DATA : text LIKE message-msgtx.
DATA: BEGIN OF ITAB OCCURS 10.
INCLUDE STRUCTURE cdshw.
DATA: UDATE LIKE CDHDR-UDATE,
USERNAME LIKE CDHDR-USERNAME,
CHANGENR LIKE CDHDR-CHANGENR,
VBELN(10),
POSNR(6),
ETENR(4),
INDTEXT(200),
END OF ITAB.
data : lv_vbeln like vbap-vbeln.
data : lv_posnr like vbap-posnr.
SELECT vbeln posnr FROM vbap INTO TABLE it_vbap WHERE
vbeln = ' ' AND
posnr = .
i_cdhdr-objectclas = 'VERKBELEG'.
i_cdhdr-objectid = ' '.
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
EXPORTING
objectclass = 'VERKBELEG'
objectid = ' '
username = space
time_of_change = i_cdhdr-utime
TABLES
i_cdhdr = i_cdhdr
EXCEPTIONS
no_position_found = 1
OTHERS = 2.
IF sy-subrc EQ 0 AND NOT i_cdhdr[] IS INITIAL.
sort i_cdhdr by CHANGENR UDATE UTIME descending.
LOOP AT i_cdhdr.
CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
EXPORTING
changenumber = i_cdhdr-changenr
TABLES
editpos = lt_editpos
EXCEPTIONS
no_position_found = 1
OTHERS = 2.
ENDLOOP.
**change in fname is eq lprio delete the records.
loop at lt_editpos.
if lt_editpos-fname = 'LPRIO' and
lt_editpos-CHNGIND = 'U' and
lt_editpos-F_NEW = '03' and
lt_editpos-tabname = 'VBAP'.
flag = 'X'.
concatenate lt_editpos-fname lt_editpos-f_new into text.
exit.
elseif lt_editpos-fname = 'KEY' and
lt_editpos-CHNGIND = 'I' and
lt_editpos-tabname = 'VBAP'.
lv_vbeln = lt_editpos-tabkey+3(10).
lv_posnr = lt_editpos-tabkey+13(6).
select single * from vbap into it_vbap where
vbeln eq lv_vbeln and
posnr eq lv_posnr.
if sy-subrc = 0 and it_vbap-lprio = '03'.
flag = 'X'.
concatenate lv_vbeln lv_posnr it_vbap-lprio into text.
exit.
endif.
endif.
endloop.
endif. -
New Input fields for Sales Order Screen
Hi all
I have to modify the existing Sales Order Screen for transactions VA01, VA02 and VA03 using user exits. I have to add two input fields (of order quantity for tow different sales units CS and BT) in existing table control of Sales order and later I want to convert these UOMs to basic UOMs.
As its a screen exit part, I had done some R&D for the same. I had never faced such requirement in past.According to my knowledge "User exits are only to put additional information in existing SAP programs and not to modify main screens."
BADI is new to me but I still tried to search BADI for the same but didn't able to find it.
Basically I am not able to find Screen Exit for this.
Can anybody help me in this regard?
If you are suggesting BADI then please try to explain in detial.
Thanks in advance
AmolHi Amol,
VA01, VA02 are fine. Since VA03 is display, you cannot edit the fields you add.
To add fields to this display you need to edit the following screens :
Program : SAPMV45A
Screen : 8309
It is the Additional Data B tab provided by SAP to add custom fields .
You may need an access key to edit this screen.
Putting your fields there and running VA01/02 will solve half your problem.
The second half is how to capture the data entered in those fields to the database.
In order to capture the data from these custom fields you can use
the user exit
MV45AFZZ
USEREXIT_SAVE_DOCUMENT_PREPARE
USEREXIT_SAVE_DOCUMENT depening on what you want to do.
Hope this helps. -
Hi Experts,
I am facing problem with mapping for standard SalesOrder Idoc ORDERS.ORDER05.
My Source Structure is: X12 EDI850
<G_SPO1> (occrance 1..100000)
<S_PO1> (occurance is 1..1)
<D_234/>
<D_234_2/>
<D_234_3/>
<D_234_4/>
<D_234_5/>
<D_234_6/>
<D_234_7/>
<D_234_8/>
<D_234_9/>
<D_234_10/>
</S_PO1>
</G_SPO1>
Target Structure is:
E1EDP01
--->E1EDP19
--->IDTNR
Functionality is passing material numbers of EDI customers to IDTNR field in E1EDP19 filed under segment E1EDP01.
From source i will get set of material numbers, for one set 10 material numbers(In source you can find 10 fields for 10 material numbers)
Requirement: I need to send those material numbers to IDTNR (One to one mapping ).
For getting 10 material numbers i just duplicated segment E1EDP19 in target side and mapped one field of source to IDTNR target in each segment. Totally mapped 10 source fields in 10 segments.
If 20 material numbers I will get two sets <G_SPO1> will repeat two times, each time 10 material numbers. So I mapped G_SPO1 to E1EDP01
S_PO1 to E1EDP19.
My out put is coming as 10 E1EDP19 segments under E1EDP01 if 10 materail numbers.
But problem is ECC team asking to get one E1EDP19 line item value under E1EDP01 line item header. They are not accepting duplicate E1EDP19 segments under header E1EDP01.
How to acheive this with my requirement.
Appreciate your hellp on this.
Thanks & Regards,
A.Neelima.There is no relation between D_234 and D_356.
I want to pass D_356 to KTEXT in all E1EDP01 segments which ever i will get based on the condition we implemented for E1EDP01.
Present its coming only for E1EDP01 first segment (for which i used condition with D_234), its not coming for remaining 9 E1EDP01 segments (for which i used conditions with D_234_2 to D_234_10)
If i pass sample input payload:
<S_ST>
<S_PID>
<D_350>Description</D_350>
</S_PID>
<G_SPO1>
<S_PO1>
<D_234>1</D_234>
<D_234_2/>2</D_234_2>
<D_234_3/>
<D_234_4/>
<D_234_5/>
<D_234_6/>
<D_234_7/>
<D_234_8/>
<D_234_9/>
<D_234_10/>
</S_PO1>
</G_SPO1>
<G_SPO1>
<S_PO1>
<D_234>3</D_234>
<D_234_2>4<D_234_2>
<D_234_3/>
<D_234_4/>
<D_234_5/>
<D_234_6/>
<D_234_7/>
<D_234_8/>
<D_234_9/>
<D_234_10/>
</S_PO1>
</G_SPO1>
</S_ST>
Coming Output Now: (KTEXT field is missing in last two segments)
<E1EDP01>
<E1EDP19>
<IDTNR>1</IDTNR>
<KTEXT>Decription</KTEXT>
</E1EDP19>
</E1EDP01>
<E1EDP01>
<E1EDP19>
<IDTNR>3</IDTNR>
<KTEXT>Decription</KTEXT>
</E1EDP19>
</E1EDP01>
<E1EDP01>
<E1EDP19>
<IDTNR>2</IDTNR>
</E1EDP19>
</E1EDP01>
<E1EDP01>
<E1EDP19>
<IDTNR>4</IDTNR>
</E1EDP19>
</E1EDP01>
Expected Output:
<E1EDP01>
<E1EDP19>
<IDTNR>1</IDTNR>
<KTEXT>Decription</KTEXT>
</E1EDP19>
</E1EDP01>
<E1EDP01>
<E1EDP19>
<IDTNR>3</IDTNR>
<KTEXT>Decription</KTEXT>
</E1EDP19>
</E1EDP01>
<E1EDP01>
<E1EDP19>
<IDTNR>2</IDTNR>
<KTEXT>Decription</KTEXT>
</E1EDP19>
</E1EDP01>
<E1EDP01>
<E1EDP19>
<IDTNR>4</IDTNR>
<KTEXT>Decription</KTEXT>
</E1EDP19>
</E1EDP01>
Thnaks & Regards,
A.Neelima. -
User exit for Saler order Idoc
We´re trying to create Sales Order through IDOC. I need to add several fixed values. I wrote a user exit in EXIT_SAPLVEDA_009 ( VEDA0001):
segmentE1EDK17----
read table DEDIDD with key segnam = 'E1EDK17'.
if sy-subrc eq 0.
v_index = sy-tabix.
v_e1edk17 = DEDIDD-sdata.
*- Fixed values--
v_e1edk17-QUALF = '001'.
v_e1edk17-LKOND = 'CFT'.
dedidd-sdata = v_e1edk17.
modify dedidd index v_index
transporting sdata.
endif.
I debugged the coding, the structure receives the values , but when I check the Sales order nothing appears .. Help !
Is there something to flags ??But How Can I access the Structure from EXIT_SAPLVEDA_001 ??
any example..
I´ll appreciate it . -
How to write a requirement for sales order outbound iDOC
i need to write the requirement for sales order IDOC
Please helpHi
From the sales order screen itself you can create the delivery from the menu
Sales order -> deliver/y
or from VL01N , enter shipping point and Order number, create and save
Reward points if useful
Regards
Anji -
Hi All,
When the Route changes in the Sales Order, I want to add the Forwarding agent to the Partfner function atutomatically. So I written the code in the User-Exist "userexit_check_vbap" with the following logic.
IF sales order is creating with VA01, Add an entry
and Changing the Sales order with VA02, modifiy an exisiting entry as follow.
But at the time of Creating with VA01, it is sucessfully adding an entry, but
whenever you the change Route for sales order with va02, Modify statement is working fine and showing the correct Partner function in the Partner Tab.
If you save the document and open it again then Changed Route is sucessfully saved but not the partner function. It always having the partner function which you given at the time of creation.
Can we write the modify statement in the "Userexist_check_vbap"
READ TABLE xvbpa WITH KEY parvw = 'ZR'
posnr = xvbap-posnr.
IF sy-subrc NE 0.
SELECT SINGLE * FROM lfa1 INTO CORRESPONDING FIELDS OF xvbpa
WHERE lifnr = tdlnr.
xvbpa-mandt = xvbap-mandt.
xvbpa-vbeln = xvbap-vbeln.
xvbpa-posnr = xvbap-posnr.
xvbpa-fehgr = '08'.
xvbpa-nrart = 'LI'.
xvbpa-lifnr = tdlnr.
xvbpa-updkz = 'I'.
CLEAR: xvbpa-kunnr, xvbpa-stceg.
xvbpa-parvw = 'ZR'.
APPEND xvbpa.
ELSE.
xvbpa-lifnr = tdlnr.
MODIFY xvbpa TRANSPORTING lifnr WHERE parvw = 'ZR'
AND posnr = xvbap-posnr.
ENDIF.
Please suggest me , how can i solve this problem.
Thanks and Warm Regards,
VijayI solved the problem by pass the following value
xvbpa-updkz = 'U'.
It solved my problem. -
Hi All
If I am not mistaken, one cannot do a STO for special stock using 2 step transfer, however it is possible in a one step process.
I have made the setting in config to use a one step process, and it have been set up to use movement type 647.
I am trying to move Sales order stock from one plant to another plant, and want to maintain it as special stock.
I can get the process to create the delivery, however, when I try and post goods issue the delivery document, I get the following message.
MSSA-SABWE exceeded by 2 EA: CISCO1402 ZA30 1000 SALEABLE E
Cisco1402 is the material
ZA30 is the plant
1000 is the storage location
Saleable is the split valuation we using
E is the special stock indicator for sales order stock.
If anyone could please give me some direction.
ThanksHi
We are not using blocked stock at all in any of our processes.
My understanding is that movement type 647 will not look or put stock into blocked stock.
If I look at table MSSA, for that Sales order number and material number, it comes up with one entry. It has a quantity of 2 in unrestricted, Val. GR Blocked Stck is 0.
Should the quantity of 2 be appearing in there?
So the process followed thus far is:
Sales order raised
Preq auto created from SO
Preq converted to PO
GR for PO
STO created to move sales order stock from one plant to another
Delivery created,
cannot post goods issue.
Thanks
Maybe you are looking for
-
Hi , Can any one explain me about this program. REPORT Z_LIST_MATERIALS. TYPE-POOLS: SLIS. TABLES:MARC, MARD, VBAP, LIPS, EKPO, VBFA, EKBE, MARM, VBBE, MARA, MBEW. SELECTION-SCREEN BEGIN OF BLOCK SEL WITH FRAME TITLE TEXT-001. SELECT-OPTIONS: S_WERKS
-
Deleting master data after loading transactional data using flat file
Dear All, I have loaded transaction data into an infocube using a flat file . While loading DTP i have checked the option "load transactional data with out master data exists" . So transactional data is loaded even if no master data is there in BW
-
I have a toshiba computer and it is windows 7, recently after I installed imatch everytime I open itunes I get the message 'i tunes has stopped working' and windows cannot find a solution and has to close. There is no solution and I don't know how t
-
Hello, I have a dvd project that has more than 60 minutes of video in it, and iDVD wants to switch to 90 minute mode, but when I click on the 90 minute button or 60 minute button when the window pops up, nothing happens, and I have to end up killing
-
Open PDF First message in Adobe.PDFBookPlugin.api
Hi, I am using Adobe.PDFBookPlugin.api for merging different pdf's into one and after merging it open merged PDF and above this one message popups that says "Open PDF First" If we click this button it start execution of next step and if we don't clic