Problem in CRM_ORDER_MAINTAIN for updating qty in more than 1 line item .
Hi abapers,
I am using BAPI CRM_ORDER_MAINTAIN to update quantity. Its updating the quantity properly if there is single line item for a transaction .If more than 1 line item is there then its throwing an exception* "Document is being distributed - changes are not possible"*.
Scenario:
I have a itab which is having 2 line items for a transaction. i run a loop pass the pass the required parameters in CRM_ORDER_MAINTAIN ,do CRM_ORDER_SAVE , BAPI_TRANSACTION_COMMIT for the 1st line item. When i run the 2nd loop, in CRM_ORDER_MAINTAIN it gives an exception saying NO_CHANGE_ALLOWED for the same transactions 2nd line item. leaving the quantity unchanged for both the line items. What may be the problem?
Note: We cannot say how many line items are there for an transaction. so no chance of grouping all items at a time and saving at a time.
Regards,
Navin
Hi Navin,
Why its not possible to use CRM_ORDER_SAVE only once. I think its possible. Call CRM_ORDER_MAINTAIN in loop for all the line item in transaction and after that call CRM_ORDER_SAVE once. Pls follow the below sample code.
loop at it_item.
call CRM_ORDER_MAINTAIN. (Here append data for all the line items and miantin the transaction).
emdloop.
After endloop call CRM_ORDER_SAVE. Also you can add some wait after CRM_ORDER_SAVE, In order to avoid locking issue.
PLs let me know where you are trying to use CRM_ORDER_MAINATIAN ? In any BADI or Z program ?
Regards,
Amol.
Similar Messages
-
Problem in CRM_ORDER_MAINTAIN for updating amount in line items
Hi abapers,
I have a scenario as follows: i want to update amount for line items in a transaction. i use the bapi crm_order_maintain followed by CRM_ORDER_SAVE and bapi transaction _commit . The problem is i loop the itab by passing the trnstn id , prdct code and new amount.
i applied the logic as given by rita tan (thread no 4)
link:[Re: Update Pricing Document with CRM_ORDER_MAINTAIN]
as per the logic i delete the existing value and insert the new amount . this works fine in the first loop and in second loop it deletes the existing record but does not insert the new value . It doesn't even give error too. what may be the problem.
here's a snapshot of the code i have written:
loop at itab.
SELECT SINGLE * FROM CRMD_ORDERADM_H
WHERE OBJECT_ID = WA_ZCMR_UPDATE-Z_OBJECTID
AND PROCESS_TYPE = P_TYPE.
SELECT SINGLE * FROM CRMD_ORDERADM_I
WHERE HEADER = CRMD_ORDERADM_H-GUID
AND ORDERED_PROD = WA_ZCMR_UPDATE-PRODUCT_CODE.
SELECT SINGLE * FROM CRMD_LINK
WHERE GUID_HI = CRMD_ORDERADM_H-GUID
AND OBJTYPE_SET = '18'.
SELECT * FROM PRCD_COND
INTO CORRESPONDING FIELDS OF TABLE IT_PRCD_COND
WHERE KNUMV = CRMD_LINK-GUID_SET
AND KPOSN = CRMD_ORDERADM_I-GUID
AND KSCHL = 'ZR12'.
READ TABLE IT_PRCD_COND
INTO WA_PRCD_COND INDEX 1.
DELETE FROM PRCD_COND
WHERE KNUMV = WA_PRCD_COND-KNUMV
AND KPOSN = WA_PRCD_COND-KPOSN
AND KSCHL = 'ZR12'.
COMMIT WORK.
WA_PRIDOC-REF_HANDLE = '0000000001'.
WA_PRIDOC-REF_GUID = CRMD_ORDERADM_I-GUID.
WA_PRIDOC-REF_KIND = 'B' .
WA_COND_ADD-KSCHL = 'ZR12'.
WA_COND_ADD-KBETR = WA_ZCMR_UPDATE-NET_VALUE.
WA_COND_ADD-KPEIN = '1'.
WA_COND_ADD-WAERS = 'INR'.
INSERT WA_COND_ADD INTO TABLE IT_COND_ADD.
CLEAR WA_COND_ADD.
WA_PRIDOC-COND_ADD = IT_COND_ADD.
CLEAR IT_COND_ADD[].
INSERT WA_PRIDOC INTO TABLE IT_PRIDOC .
CLEAR WA_PRIDOC .
WA_CT_INPUT_FIELDS1-REF_HANDLE = '0000000001'.
WA_CT_INPUT_FIELDS1-REF_GUID = CRMD_ORDERADM_I-GUID.
WA_CT_INPUT_FIELDS1-REF_KIND = 'B' .
WA_CT_INPUT_FIELDS1-OBJECTNAME = 'PRIDOC'.
INSERT WA_CT_INPUT_FIELDS1 INTO TABLE IT_CT_INPUT_FIELDS1.
CLEAR WA_CT_INPUT_FIELDS1.
AT END OF Z_OBJECTID.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
IT_PRIDOC = IT_PRIDOC
CHANGING
CT_INPUT_FIELDS = IT_CT_INPUT_FIELDS1
EXCEPTIONS
ERROR_OCCURRED = 1
DOCUMENT_LOCKED = 2
NO_CHANGE_ALLOWED = 3
NO_AUTHORITY = 4
OTHERS = 5.
CALL FUNCTION 'CRM_ORDER_SAVE'
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
endat.
endloop.
Please help out.
Regards,
Navin
Edited by: navin.c on Jan 7, 2010 10:09 AMCheck the link below. This should help
Re: Change Order Quantity in CRM Sales Order -
A&D ADSUBCON: wrong qty in delivery for subcontr.PO with more than one item
Hi gurus,
i created a subcontracting PO with 2 item: item 10 for 200 PC and item 20 for 500 PC.
When i create a delivery, using ADSUBCON (because i have to managed special stock E), the delivery quantities are wrong.
I mean: I obtain a delivery with item 10 for 500 PC and item 20 for 500 PC; same quantity.
It seems that SAP takes the quantity of the last PO's item ( in my example the qty of the second PO item 500PC).
I tried to invert the case: PO with item 10 for 500 PC and item 20 for 200 PC. The delivery created has 200 PC for item 10 and 200 PC for item 20
I also tried to create a PO not for MTO but for MTS and using ADSUBCON transaction the delivery quantity still be wrong but using ME2O it is correct (but this second case isn't my case because i need to manage customer stock E).
It is for this reason that i suppose that the problem is related to A&D...
Please, could you help me?
It is very important and urgent.
Thank you in advance for your collaboration.i've not worked with ADSUBCON txn but could find a a note related to similar issue, have a look at it:
SAP Note 736737 - ADSUBCON: Problems with the performance and data display
yogesh -
hi ,
I have a problem with my iphone. I have a 8G and I have more others than any apps , audio , photos and whatevaer.I have about 2G of others on it.I deleted all my safari cache and data. How can I reduce it ?
Thanks!!!This can indicate corrupt files. A restore should resolve.
-
I am building a form for customers to complete. I want them to be able to click on a pull down menu and select the day of the month 1-31. The drop down form field only allows 25 entries. How can I get 31 entries? I'm on a Macbook Pro running Mountain Lion.
Hello,
This forum is for troubleshooting Apple Software Update for Windows, a software package for Windows designed to update Apple products that run on Windows, and not related to Microsoft Office in any way. I suggest you post Office related questions on Microsoft's own forums for their Mac products.
http://www.officeformac.com/productforums -
Partner Bank type (PBT) need to be updated in Old Vendor open line items.
Hi all,
We have implemented PBT functionality in our client. We have some challenges at the time of payment run (F110). Some of the line items where PBT not updated i.e. old open items ( Before implement PBT) not picking for payment. Hence, it is cause short or over payment to vendor.
Can some one tell me is there program for update PBT in vendor old line items ( those are posted before implementation)
Thanks in advance.
Thanks & Regards,
Y.Kiran Babu.Hi,
There is no standared programs in the system to update data into tables.
first it is not recomondable to updated line item missing information.
best practice is download all old open items, and upload with PBT through BDC.
Work around solution (but not recomonded) update BSIK - BVTYP with help of ABAPer.
By using ABAP Quarry technical person can able to update data into tables.
regards
Viswa -
TS1702 why can't i update the app more than 50mb from itune but can throught wifi?
I tried to update Apps more than 50mb through itune, but found the Apps which are needed to be update are mark "Downloaded" in iTune store. Of course if the Apps mark "Downloaded" are not able to do anything with it. On the other hand, I can simply use wifi to update the Apps, more than 50mb, throught my iphone instead of iTune. Is there any problem with iTune or something wrong with my phone?
In the App section of your itunes library ( NOT the sync pages) there is a button at the bottom which says Check for updates
-
Dear Apple support team,
I've already changed email for my apple id more than 6 months. But 2-3 months ago until now I've recieved and email to ask my apple id confirmation from me about 6-8 emails. I never confirm anything because I don't know,the link's attached, it's legal or illegal.
The latest link (just be sent to my email 1 hr. ago) : http://www.smartpixeladv.com/proma/Login/index.html
Text is:
Dear Customer,
We recently noticed an unusual activity in your iTunes account. Please complete the process to confirm your
informations.
Confirm Now>
This link will expire three days after this email was sent.
If you don’t make this request, your account will be blocked for security reasons.
Apple Support
In my opinion, i think "http://" should be "https://" right? Or Apple should show the link on your website that we can find, re- check and click by ourselve. Or Apple should do "How to confirm apple id" on your main page. ( in fact i'm not sure you already done "How to" on your website yes or not, because I cannot find it)
The apple id is sensitive security, it's concerned personal security and any credit card payment so please understand me that's why i must to interrupt your team to help me to solve this problem. I'm scared my account will be blocked. Please advice me.
Wassa. (BKK)It is a phishing attempt to get your Apple ID and Password.
You should forward it to Apple : [email protected] -
Basically I cannot add more than 11 items on to a web app map. If I add more than 11 than the rest of the items appear of the coast of Africa for some reason. I am not sure why this happens but I was wondering if anyone else has had a similar problem and found a fix.
Basically I cannot add more than 11 items on to a web app map. If I add more than 11 than the rest of the items appear of the coast of Africa for some reason. I am not sure why this happens but I was wondering if anyone else has had a similar problem and found a fix.
-
Workflow on Email shoot for Un-Attended Lead more than 24 hours in MS Dynamics CRM 2011?
I want to create Workflow for Un-Attended Lead more than 24 hours then Email will shoot Automatically to User as {BM(BranchManager)}
My Business Unit Hierarchy is :
Main Organisation >> RBH Trading(Head) >> BM Trading(Branch Manager) >> RM Trading(Relational Manager)
So, if any RM will not attend his Lead until 24 hours then 1 Auto Email should send to his BM.
Actually the Problem is how to set BM Email into Email Template's "To" Field and i cannot fix any 1 BM there.
PLEASE HELP!MatejLach wrote:
clamd is running, user and group clamav all have the relevant permissions as far as I can tell, however upon scanning my mail, I always end up with the following error:
Scanning error:
/home/username/.claws-mail/mimetmp/0000000e.mimetmp: lstat() failed: Permission denied. ERROR
Seems like a permissions error to me... maybe check the actual file it is attempting to scan... I know it is in your home folder, but just to be sure, you might want to check that everything is sane. -
How to insert more than 12 items using BDC for MB1C
Hi,
When we use LSMW for data transfer of MB1C transaction, more than 12 items can be inserted in a document.
But using BDC only 12 and below is possible, if the flat file system has more that 12 item, then the document is not created.
How to insert more than 12 item in a document.
RegardsHi Gow,
I have uploaded the MB1C through a BDC and it is working fine for n no of items.
Here is the code. May be this will be of your help.
*& Report ZMB1C
report ZMB1C
no standard page heading line-size 255.
type-pools : slis.
tables : t100.
data: begin of record,
MATNR(018),
ERFMG(017),
EXBWR(016),
end of record.
data : itab like table of record with header line.
data : w_bdcdata type bdcdata.
data : t_bdcdata type standard table of bdcdata initial size 1.
data : messtab type standard table of bdcmsgcoll with header line.
data : mstring(300).
data : vf_index type i,
no_lines type i,
count type i value 0.
data : v_bldat(20),
v_budat(20).
*Excel Sheet Data Upload Details
data : vf_start_col type i value '1', "start column
vf_start_row type i value '2', "start row
vf_end_col type i value '100', "maximum column
vf_end_row type i value '10000'. "maximum row
*/ Internal Table For Excel Data
data : it_excel type kcde_cells occurs 0 with header line.
*/ Field symbol
field-symbols : <fs>.
data : begin of it_messtab occurs 0,
plant(10) type c,
status(10) type c,
message(90) type c,
end of it_messtab.
*Data for ALV display
data : wa_fcat type slis_fieldcat_alv,
colcnt type i.
data : it_fieldcat type slis_t_fieldcat_alv,
i_events type slis_t_event.
data : l_title type sychar70.
data : l_repid like sy-repid.
* Selction Screen
selection-screen begin of block b1 with frame title text-000.
parameters : p_file like ibipparms-path obligatory,
p_mode like ctu_params-dismode default 'A'.
selection-screen end of block b1.
selection-screen begin of block b2 with frame title text-001.
parameters : p_bldat like MKPF-BLDAT obligatory,
p_budat like MKPF-BUDAT obligatory,
p_bwart like RM07M-BWARTWA obligatory,
p_werks like RM07M-WERKS obligatory,
p_lgort like RM07M-LGORT obligatory.
selection-screen end of block b2.
* At Selction Screen
at selection-screen on value-request for p_file.
call function 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = ''
IMPORTING
file_name = p_file.
*Start of Selection Event
start-of-selection.
call function 'KCD_EXCEL_OLE_TO_INT_CONVERT'
EXPORTING
filename = p_file
i_begin_col = vf_start_col
i_begin_row = vf_start_row
i_end_col = vf_end_col
i_end_row = vf_end_row
TABLES
intern = it_excel
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
others = 3.
if sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
if it_excel[] is initial.
MESSAGE I000(ZCL_TCSABAP).
else.
sort it_excel by row col.
loop at it_excel.
move : it_excel-col to vf_index.
assign component vf_index of structure itab to <fs>.
move : it_excel-value to <fs>.
at end of row.
append itab.
clear itab.
endat.
endloop.
endif.
if not itab[] is initial.
DESCRIBE TABLE itab LINES no_lines.
clear messtab.
refresh messtab.
CONCATENATE p_bldat+6(2) '.' p_bldat+4(2) '.' p_bldat(4) into v_bldat.
CONCATENATE p_budat+6(2) '.' p_budat+4(2) '.' p_budat(4) into v_budat.
perform map_rec.
call transaction 'MB1C' using t_bdcdata mode p_mode update 'A'
messages into messtab .
clear t_bdcdata.
refresh t_bdcdata.
loop at messtab where msgtyp = 'E' or msgtyp = 'S' .
select single * from t100 where sprsl = messtab-msgspra
and arbgb = messtab-msgid
and msgnr = messtab-msgnr.
if sy-subrc = 0.
mstring = t100-text.
if mstring cs '&1'.
replace '&1' with messtab-msgv1 into mstring.
replace '&2' with messtab-msgv2 into mstring.
replace '&3' with messtab-msgv3 into mstring.
replace '&4' with messtab-msgv4 into mstring.
else.
replace '&' with messtab-msgv1 into mstring.
replace '&' with messtab-msgv2 into mstring.
replace '&' with messtab-msgv3 into mstring.
replace '&' with messtab-msgv4 into mstring.
endif.
condense mstring.
it_messtab-message = mstring(300).
it_messtab-plant = p_werks.
if messtab-msgtyp = 'E'.
it_messtab-status = 'Error'.
else.
it_messtab-status = 'Success'.
endif.
append it_messtab.
clear it_messtab.
endif.
endloop. "messtab
if not it_messtab[] is initial.
perform buildcatalog.
perform display.
endif.
endif.
*& Form Map_Rec
* text
form map_rec.
perform bdc_dynpro using 'SAPMM07M' '0400'.
perform bdc_field using 'BDC_CURSOR'
'RM07M-WVERS3'.
perform bdc_field using 'BDC_OKCODE'
'NPE'.
perform bdc_field using 'MKPF-BLDAT'
v_bldat.
perform bdc_field using 'MKPF-BUDAT'
v_budat.
perform bdc_field using 'RM07M-BWARTWA'
p_bwart.
perform bdc_field using 'RM07M-WERKS'
p_werks.
perform bdc_field using 'RM07M-LGORT'
p_lgort.
perform bdc_field using 'XFULL'
perform bdc_field using 'RM07M-XNAPR'
'X'.
perform bdc_field using 'RM07M-WVERS2'
perform bdc_field using 'RM07M-WVERS3'
'X'.
loop at itab.
count = count + 1.
perform bdc_dynpro using 'SAPMM07M' '0410'.
perform bdc_field using 'BDC_CURSOR'
'MSEG-EXBWR'.
if count <> no_lines.
perform bdc_field using 'BDC_OKCODE'
'=NPE'.
elseif count = no_lines.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
endif.
perform bdc_field using 'MSEG-MATNR'
itab-MATNR.
perform bdc_field using 'MSEG-ERFMG'
itab-ERFMG.
perform bdc_field using 'MSEG-EXBWR'
itab-EXBWR.
endloop. "itab
endform. "Map_Rec
** Form BDC_DYNPRO
form bdc_dynpro using program dynpro.
clear w_bdcdata.
w_bdcdata-program = program.
w_bdcdata-dynpro = dynpro.
w_bdcdata-dynbegin = 'X'.
append w_bdcdata to t_bdcdata.
endform. "bdc_dynpro
** Form BDC_FIELD
form bdc_field using fnam fval.
if fval <> space.
clear w_bdcdata.
w_bdcdata-fnam = fnam.
w_bdcdata-fval = fval.
append w_bdcdata to t_bdcdata.
else.
clear w_bdcdata.
w_bdcdata-fnam = fnam.
w_bdcdata-fval = fval.
append w_bdcdata to t_bdcdata.
endif.
endform. "bdc_field
* FORM buildcatalog *
form buildcatalog.
clear wa_fcat.
clear it_fieldcat.
colcnt = colcnt + 1.
wa_fcat-col_pos = colcnt.
wa_fcat-fieldname = 'PLANT'.
wa_fcat-tabname = it_messtab.
wa_fcat-seltext_l = 'PLANT'.
wa_fcat-key = 'X'.
wa_fcat-outputlen = '10'.
append wa_fcat to it_fieldcat.
clear wa_fcat.
colcnt = colcnt + 1.
wa_fcat-col_pos = colcnt.
wa_fcat-fieldname = 'STATUS'.
wa_fcat-tabname = it_messtab.
wa_fcat-seltext_l = 'STATUS'.
wa_fcat-outputlen = '10'.
append wa_fcat to it_fieldcat.
clear wa_fcat.
colcnt = colcnt + 1.
wa_fcat-col_pos = colcnt.
wa_fcat-fieldname = 'MESSAGE'.
wa_fcat-tabname = it_messtab.
wa_fcat-seltext_l = 'Message'.
wa_fcat-outputlen = '90'.
append wa_fcat to it_fieldcat.
endform. "buildcatalog
* FORM display *
form display.
l_title = text-002.
l_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = l_repid
i_grid_title = l_title
it_fieldcat = it_fieldcat
it_events = i_events[]
TABLES
t_outtab = it_messtab
EXCEPTIONS
program_error = 1
others = 2.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endform. "display
Regards,
Amit -
Reversed OL in Firefox ESR 31.1.1 is wrong for more than 53 items
The ESR version of Firefox (31.1.1) finally acknowledges <OL reversed="reversed"> (standard HTML5), but the implementation is only working properly for up to 53 items in the list. If there are more than 53 items, then the list will still start at 53, then count down to 1, then zero and then start on negative numbers...
There must be a bug in how the total number of items in the list is calculated.hello bjornclausen, if you think it's a problem in the browser's implementation, please file a bug for that issue at bugzilla.mozilla.org.
-
I downloaded the pokemon yellow version app for my ipod touch more than a month ago and it is still not working. It has not worked for anybody who bought it. Why is it off of the app store now and how do I get my money back?
That message is usually due to a bad cable.
Not Charge
- See:
iPod touch: Hardware troubleshooting
iPhone and iPod touch: Charging the battery
If you can’t charge your iPhone, iPad, or iPod touch
- Try another cable. The cable for 5G iPod (lightning connector) seems to be more prone to failure than the older cable.
- If a 5G iPod
Iphone 5 lightning port charging problem - SOLUTION!
- Try another charging source
- Inspect the dock connector on the iPod for bent or missing contacts, foreign material, corroded contacts, broken, missing or cracked plastic.
- Make an appointment at the Genius Bar of an Apple store.
Apple Retail Store - Genius Bar
or send it in to Apple. See:
Service Answer Center - iPod -
Is there a way to place an order with more than one item at a time? for example I am making a few books and having them all shipped to me. Do I have to order each one separately and pay shipping each time?
You have to order each book separately, if the books are different. Only multiple copies of the same book can be ordered in the same order, see here
Regards
Léonie -
GR-GI printout for more than one item in one document
Hi Friends,
In my GR document, there are more than one materials receipted in one document. I am taking the printout of GR slip by assigning the printer in MB02 T-Code. And then through MB90 i am taking the printout. But in MB90 in the print preview, I can see only one item at a time. where as I have receipted more than one item in one document. In MB02 I have to assign the printer one by one to each item and in MB90 also i can see only one item in the GR slip. How can I take the printout of the of all the items in the GR document all at a time??????
Same is the case for Goods Issue slip. Here also i can see the print preview of only one item at a time.
Please advice.
Thanks & Regards
SatyaSatyabrata,
<b>In transaction "OMBR" define print version indicator as "3" for the transactions through which you are creating this material document</b> this basically defaults when performing the transaction. You can also set the indicator to collective in the intial screen of the transaction.
Defination of print version:
Version for printing of GR/GI slip, Specifies the version of the goods receipt/issue slip.
You can print out three different versions of a GR/GI slip:
<b>Individual slip (version 1)</b>
In this case, one GR/GI slip is printed out for each item.
<b>Individual slip with inspection text (version 2)</b>
In this case, one GR/GI slip is printed out for each item. In addition, a quality inspection text is printed if there is one in the material master record.
<b>Collective slip (version 3)</b>
In this case, a collective slip including all the items in a document is printed.
Hope this helps...
Regards,
Prasobh
Maybe you are looking for
-
How do I get Flash to recognize my TextInput from class?
Hi - I'm trying to write a class for a standard input form. I've got a movieclip in the library and have linked it to this class. (class included below.) This movieclip contains several text inputs which I have declared in my class file. I can get th
-
Photoshop CS4, won't recognize new scanner
Hi all. I have a new Dell Windows Vista 64 and have CS4, legit on it. I have installed the Vista 64 driver on this epson 4490 photo scannner. That all went well. The computer recognizes it, I can click on the icon on the desk top and bring up the
-
Hi guys, i need that the help match code apperas in one select-options parameter. Select-options: PERNR for PA0001-PERNR , the one i need is the same i use in se51 (screen painter), in help search is: EHS00SHLP_PREM i need something like: Select-opti
-
Defining values on SD Billing Plan during order entry
Scenario- User enters a sales order with 10 line items. Based on specific material master information (material group, etc), items will be split on two billing plans. For example, lines 1, 3, and 10 would go on the first billing plan at 5% of the pri
-
I'm trying to add a simple Spry slide effect to some text on one of my web sites, however the text dissapears in IE7. I've managed to cut it down to the most basic code where the problem occurs and it turns out to be a table cell. I took the slide ex