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!!!
Maria
Mmmm 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 !!!
Similar Messages
-
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 -
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 -
Extracting User Status for Sales Orders
I am trying to extract user status transactional data for sales orders (at both the header and item level). I have been following SAP note 300300 to configure the status extractors and map the BW objects to sales order status data sources (2LIS_11_VASTH & 2LIS_11_VASTI). I think I have set up both R/3 and BW correctly according to note 300300 and the IMG documentation, but I am not getting any values in the info source for the new user status info objects, when I run the extract.
Has anyone successfully done this? If so, do you have any documentation or pointers on how I can get this to work? Or, am I better off creating a generic extractor? Thanks for your consideration.
Sincerely, Hashi ChakravartyHello Ravi,
well yes, I can derive the status for that order in the update rules if i show the status as an attribute of the 0pm_order; but basically there will be only the last status shown.
My problem:
a. i report on day 1, the status of the order is REL
b. on day 2 i load the master data for the orders, new status is TECO
c. on day three i want to report in the past and see the status of day 1; that's not possible in this scenario because i'll see the current status (TECO).
So that's why I want to have the statuses in the cube...
The 2lis_17_i3hdr extractor is only sensitive to CRT and TECO statuses, but not to the others (like REL / BLC and so on... :_(( )
I could read the statuses from the JEST and TJ02T tables...but still, if a document status is changed, no delta record is written in the queue...
Thanks,
Tudor -
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. -
How to setup to change status line sale order via shipping transaction
Hi all,
When create sale order Qty = 10 and Lot_xx = 10 but i want to reserve qty = 7 and . In this business will be reservation Qty order for jot and lot only
acction plan below 2 case :
Case (1)
Via Release sale order form :
Enter sale order number and check box prior reservation only.
Via Shipping Transaction form :
Line sale order will be slip 2 line
Line 1 status is stage/Pick Confirm Qty = 7
Line 2 status id Redy to Release Qty = 3
Go to ship confirm
---> Line 1 status is Interface
Line 2status is cancle
***** I dont want Line 2 is cancle i want this line backorder. I believe oracle will be can setup option to choose backorder or cancle line sale order after release sale order. But i don't know to setup this.
Case (2)
Via Release sale order form :
Enter sale order number and dont dont check box prior reservation only.
Via Shipping Transaction form :
Line sale order will be slip 2 line
Line 1 status is stage/Pick Confirm Qty = 7 Lot_xx
Line 2 status id stage/Pick Confirm Qty = 3 Lot_yy Automatic select Lot other
******* In face I think when reserve spacific and release sale order will be release Qty = 7 only and Qty = 3 is get backorder. But in face Line Qty = 3 status is stage/pick confirm and seletc Lot_yy, i don't want this and how to best solution.
Best Regards,
Prathana.You can write a simple pl/sql logic to get the correct org id. I am assuming that you have two responsibilities in the same operating unit and one should default with A and one should default with C. Both use the same order type.
When the resp that is responsible for org A, will have org A from order type.
For resp that is responsible for org C, you can create a pl/sql logic where you read the current responsibility using fnd_profile.value('RESP_ID'). If the resp_id is responsible for C then return organization_id of C.
You can find example code for order line entity for attribute tax code.
Let me know if you need anymore info.
Thanks
Nagamohan -
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. -
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. -
Table which stores Object Status for Sales order
Hi Experts,
In Sales order header Status , there is a an object status when i click on that one it will take to new screen
It will show status with status no, and Status w/o Status no.
I want to know in which table this status will be saved.
Please let me know if my question is unclear.
Thanks,
Sunil kairam.Hi Vikranth,
I already check that but didn't find my answer in that.
I have these following status showing when i click on object status buttion.
No Stat Text
10 S10 Not approved (Finance)
20 S20 Only Down payment Allowed
30 S30 Eligible to Order Book Record
40 S40 Totally approved (Finance)
TECH Technically valid
EXEC Released for execution
BIOK Batch input success
FPD First Promised Date
FF Firm Forecas
Can you please tell me where this status will be stored?
Thanks,
Sunil kairam. -
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 -
How to find out the Accounting document status for sales order
Hi
We have created the sales document by referring the billing document of contract no.Aftre that we have raised invoice for sales document. Now system is generated both invoice , accounting document and the value is appearing against the invoice document. However the status against the accounting document is showing as not cleared. I want to know where we could see this status in Table,
Normally we can see the status in FPLT for contracts since its having the billing plan no. Suppose if the billing plan is not available like S.O , How to check the status in table?
I have refered so many tables but not helping. Since i want to get the uncleared value of accouting document.
Please help me.
Regards
ThennaHi Thenna
The accounting document status in the document flow is determined dynamically when you display the document flow,
it's not saved in a specific table.
Here is the relevant logic:
LV05CF01 -> form BUCHHALTUNGSBELEG
IF vbrk-vbeln <> vbfa_tab-vbeln.
PERFORM vbrk_ermitteln USING vbfa_tab-vbeln.
REFRESH xbkpf.
CALL FUNCTION 'FI_DOCUMENT_READ'
LOOP AT xbseg WHERE bukrs EQ xbkpf-bukrs
AND belnr EQ xbkpf-belnr
AND gjahr EQ xbkpf-gjahr
AND ( koart EQ 'D' OR koart EQ 'K' ).
ENDLOOP.
IF NOT sy-subrc IS INITIAL.
SET STATUS TO 'No items are cleared'
l_xdoc_num-status = 'A'. <<<
ELSE.
LOOP AT xbseg WHERE augbl IS initial
AND umskz NE 'A'
AND vorgn NE 'AZUM'
AND ( koart EQ 'D' OR koart EQ 'K' ).
ENDLOOP.
IF NOT sy-subrc IS INITIAL.
Set status to 'All items are cleared'
l_xdoc_num-status = 'C'. <<<
ENDIF.
ENDIF.
Regards,
Alex -
Overall Status for sales order line & header on a service order
Hello,
I have a service order that has been fully delivered and invoiced but the overall status for that line & header is "In process".
I am unclear which area of configuration determines / controls the overall status. Can anyone help point me in the right direction?
Thanks.Hi Vicky,
Check the completion rule in the item category of the order?
Regards,
Raghu. -
Need function module for Sales order overall status
Dear Team,
Our requriement is we need to capture sales orders overall status 'compleated' in header and item datat details.
Could you please let me know what are function modules available for to get the over all status for sales orders, (header and item)
Thanks & Regards,
MK.Hi MK,
Use any of this FMs.
C1CE_VBUK_READ
SD_VBUP_READ_WITH_VBELN
WCB_VBUK_READ
Note that the values are in table VBUK and you can do a select statement from that table to get what you need.
Regards,
Peter -
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.
Maybe you are looking for
-
How do i download a dictionary to help with spelling/typing on firefox pages?
When I'm writing emails etc. on other computers, a red line appears underneath incorrect spellings (a bit like when using Microsoft Word). On my computer no such thing happens. When I click the 'Check Spelling' button on my hotmail screen, it tells m
-
The J2EE Tutorial (Chap 15-Custom Tags in JSP pages
The definition class "DefinitionTag" talks about putting the definition instance of "Definition" class in a page context, using the following code // put the definition in the page context context.setAttribute(definitionName, definition, context.APPL
-
Hi everyone, I did a software update, but when I run it I get an (0Xc000007b), what should I do? Thanks in advance for help
-
How do I install Adobe Output module into Bridge CC?
How do I successfully install Adobe Output module into Bridge CC?
-
Hey, I'm trying to write a code that changed changed the Color of the results, so if it takes a certain time it comes back red and so on. Heres the code I have right now, but its not working. Is it possible to do it? select case when nvl(round(qty_on