Doubt on Good movements using BAPI'S for Uploading
Hi Experts,
i am doing a bdc program to upload for mb1a transaction using BAPI..I am new to BAPI area..But with some reference i have finished the program..But i dont know why in clear statement and in gui upload showing error..IN gui upload when i activate the exception its throwing error..Hereby i am pasting the code...Any idea pls share with me..
<removed by moderator>
I dont know how to make the code show correctly...any help???????
Regards
Karthick
Moderator message: please post only relevant code parts, observe the maximum of 5000 characters per post to preserve formatting, leave out commented lines, etc.
Edited by: Thomas Zloch on Feb 10, 2011 6:05 PM
sorry moderator...it will not happen again..
my scenario is like this i ahve to upload the serial number with respect to the quantity in unit of measure..i am not getting any idea on this..for example if the quantity for the material is 5 then it has to upload five serial numbers...
please help me on this!!!!!!!!
regards
Karthick
Edited by: karthicksap on Feb 12, 2011 5:25 AM
Hi kris,
Finally i finished the coding..its working fine...but now its throwing material is not maintained in plant..checked with that..but material is maintained there..i dont know why its throwing the error..i checked with debugging and i found that its taking the last serial number only..for every material..my flatfile is like this..
11.01.2011 11.01.2011 abc 9051 5101 stbdx300 3 600001 0 1000000000000001
11.01.2011 11.01.2011 abc 9051 5101 stbdx300 3 600001 0 1000000000000002
11.01.2011 11.01.2011 abc 9051 5101 stbdx300 3 600001 0 1000000000000003
any idea kris.>?????
regards
Karthick
Similar Messages
-
Goods movement using bapi BAPI_PROCORDCONF_CREATE_TT
Hi,
I am using the bapi BAPI_PROCORDCONF_CREATE_TT to confirm the process order and do automatic goods movement. The problem I am facing is it is confirming the process order but goods movement, at times is working and at times is not doing goods movement. Do not know whether its a data issue or I am doing something wrong in the bapi. Pls help on this.Hi Vishal, Thnx for the reply, actually what is happening.
step1: I am creating a process order in COR1.
step2: I am releasing the process order in COR2. Batch is getting assigned automatically.
step3: In tcode COR6N when I am entering the process order, the yield field is getting populated with the order quantity ( quantity created in COR1 ). Then I am moving to goods movement button. There at times I am getting material with movement type 261, then GM is not happening, but if I delete that partucular material with movement type 261 and click save button GM is done successfully.
This when I am doing through bapi, I am getting the confirmation but no GM. Hence in AFRU-WABLNR is coming blank -
Hello ! pls give some ti[ps how to use bapi's for data uploading?
hello !
pls give some ti[ps how to use bapi's for data uploading?
regards,
ArjunHi,
See the below report extract:
where it_data is having uploaded data.
LOOP AT<b> it_data</b> INTO wa_data.
line_count = sy-tabix.
"Date Validation
CONCATENATE wa_data-uplft_date4(4) wa_data-uplft_date2(2) wa_data-uplft_date+0(2)
INTO wa_data-uplft_date.
"READ TABLE it_ekko INTO wa_ekko WITH KEY lifnr = wa_data-vendor.
LOOP AT it_ekko_temp INTO wa_ekko_temp WHERE lifnr = wa_data-vendor.
IF wa_ekko_temp-kdatb <= wa_data-uplft_date AND wa_ekko_temp-kdate >= wa_data-uplft_date.
MOVE-CORRESPONDING wa_ekko_temp TO wa_ekko.
APPEND wa_ekko TO it_ekko.
ENDIF.
ENDLOOP.
"IF sy-subrc = 0 AND wa_ekko-kdatb <= wa_data-uplft_date AND wa_ekko-kdate >= wa_data-uplft_date.
LOOP AT it_ekko INTO wa_ekko.
wa_data_header-pstng_date = wa_data-uplft_date.
wa_data_header-doc_date = sy-datum.
wa_data_header-bill_of_lading = wa_data-bill_of_lad.
wa_data_header-ref_doc_no = wa_data-del_no.
CONCATENATE wa_data-header_text1 '-'
wa_data-header_text2 '-'
wa_data-header_text3 '-'
wa_data-header_text4
into wa_data_header-HEADER_TXT.
IF wa_data-indicator = 'Y'.
wa_data_item-material = '000000000000200568'.
ELSE.
wa_data_item-material = '000000000000200566'.
ENDIF.
LOOP AT it_ekpo INTO wa_ekpo WHERE ebeln = wa_ekko-ebeln AND matnr = wa_data_item-material.
"Collect Item Level Data
wa_data_item-plant = '1000'.
wa_data_item-stge_loc = '1001'.
wa_data_item-move_type = '101'.
wa_data_item-vendor = wa_data-vendor.
wa_data-qnty = wa_data-qnty / 1000.
wa_data_item-entry_qnt = wa_data-qnty.
wa_data_item-po_pr_qnt = wa_data-qnty.
wa_data_item-entry_uom = 'KL'.
wa_data_item-entry_uom_iso = 'KL'.
wa_data_item-orderpr_un = 'KL'.
wa_data_item-orderpr_un_iso = 'KL'.
wa_data_item-no_more_gr = 'X'.
wa_data_item-po_number = wa_ekpo-ebeln.
wa_data_item-po_item = wa_ekpo-ebelp.
wa_data_item-unload_pt = wa_data-unload_pt.
wa_data_item-mvt_ind = 'B'.
APPEND wa_data_item TO it_data_item.
CLEAR wa_data_item.
ENDLOOP.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = wa_data_header
goodsmvt_code = goodsmvt_code
testrun = 'X'
TABLES
goodsmvt_item = it_data_item
return = return.
READ TABLE return INTO wa_return WITH KEY type = 'S'.
IF sy-subrc <> 0.
DESCRIBE TABLE return LINES sy-tfill.
IF sy-tfill = 0.
CALL FUNCTION <b>'BAPI_GOODSMVT_CREATE'</b>
EXPORTING
goodsmvt_header = wa_data_header
goodsmvt_code = goodsmvt_code
testrun = ' '
TABLES
goodsmvt_item = it_data_item
return = return.
CALL FUNCTION <b>'BAPI_TRANSACTION_COMMIT'</b>
EXPORTING
WAIT = 'X'
IMPORTING
RETURN =
ENDIF.
ENDIF.
LOOP AT return INTO wa_return.
WRITE: 'Messsage TYPE ', wa_return-type,
/,'ID ', wa_return-id,
/, 'Number ', wa_return-number,
/, 'Message ', wa_return-message,
/, 'Long Text ', wa_return-message_v1,
wa_return-message_v2,
wa_return-message_v3,
wa_return-message_v4,
/, 'Failed at line', line_count.
ENDLOOP.
CLEAR: wa_ekko, wa_ekpo, wa_data, it_data_item[], wa_data_header.
ENDLOOP.
Reward if useful! -
Goods issue using bapi BAPI_GOODSMVT_CREATE getting error E M7
HI consultants,
While posting goods issue using bapi BAPI_GOODSMVT_CREATE . Running the batch job(zprogram) to post the goods issue . The goods issue is been posted by passing goods receipt data's.
while processing 3 goods receipt , 2 works fine one goods receipt getting E M 7 300 NO ITEMS ARE TRANSFERED error.
when i processing one by one all the 3 goods receipt is working fine and process sucessfully. While processing in bulk ,i am getting this issue.
If anybody faces this same problem or knows the solution .Please post the answer.
The way i am passing the parameter to bapi given bellow.
WA_GOODSMVT_CODE-GM_CODE = C_03.
*--populate header data
WA_GOODSMVT_HEADER-DOC_DATE = WA_MKPF-BLDAT.
WA_GOODSMVT_HEADER-PSTNG_DATE = WA_MKPF-BUDAT.
*--populate item data
*-- call the bapi for posting goods issue
IT_GOODSMVT_ITEM-NETWORK = WA_RESBP-AUFNR.
IT_GOODSMVT_ITEM-RESERV_NO = WA_RESBP-RSNUM.
IT_GOODSMVT_ITEM-RES_ITEM = WA_RESBP-RSPOS.
IT_GOODSMVT_ITEM-ACTIVITY = WA_RESBP-VORNR.
IT_GOODSMVT_ITEM-MOVE_TYPE = C_281.
IT_GOODSMVT_ITEM-ENTRY_QNT = WA_RESBP-NET.
*--get the item details
IT_GOODSMVT_ITEM-MATERIAL = WA_MSEG-MATNR.
IT_GOODSMVT_ITEM-PLANT = WA_MSEG-WERKS.
IT_GOODSMVT_ITEM-STGE_LOC = WA_MSEG-LGORT.
IT_GOODSMVT_ITEM-ENTRY_UOM = WA_MSEG-ERFME.
CALL FUNCTION 'CONVERSION_EXIT_ABPSP_OUTPUT'
EXPORTING
INPUT = WA_MSEG-PS_PSP_PNR
IMPORTING
OUTPUT = WA_PSPHI_TEMP.
IT_GOODSMVT_ITEM-WBS_ELEM = WA_PSPHI_TEMP.
APPEND IT_GOODSMVT_ITEM.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
GOODSMVT_HEADER = WA_GOODSMVT_HEADER
GOODSMVT_CODE = WA_GOODSMVT_CODE
IMPORTING
MATERIALDOCUMENT = WA_MATERIALDOCUMENT
TABLES
GOODSMVT_ITEM = IT_GOODSMVT_ITEM
RETURN = IT_RETURN.
With Regards,
Ambrose Mohandoss.Problem solved.
-
Material Movement using BAPI with serial number.
Hello,
I am currently doing material movement using BAPI with serial number management, however in some case it works fine and in some cases it given and error message E213(IO). Unable to find the reason, when simulated the same it works fine for 200 serial numbers and gives error when going above 200 serial number. The confusion is some times it works fine for 3000 serial number as well.
Tried finding the reasion on every possible site. No results.
Thanks in advance for some solution.Hello,
I am currently doing material movement using BAPI with serial number management, however in some case it works fine and in some cases it given and error message E213(IO). Unable to find the reason, when simulated the same it works fine for 200 serial numbers and gives error when going above 200 serial number. The confusion is some times it works fine for 3000 serial number as well.
Tried finding the reasion on every possible site. No results.
Thanks in advance for some solution. -
How to add new line item using BAPI BAPI_CONTRACT_CHANGE for contract-ME32K
HI Experts,
how to add new line item using BAPI: BAPI_CONTRACT_CHANGE for existing contract.
Requirement:
Already the contract having two line items using ME31K.
Custom program has to add new line items in existing contract.
Thanks,
SendilI got the solution:
We can do like this:
1. Get all details using details, BAPI_CONTRACT_GETDETAIL.
2. After getting results, append new line item. Then use your BAPI.
Check this posting program.. where this bapi is used, use the same coding technique.
IDOC_INPUT_PURCONTRACT_CHANGE -
Anyone used BAPI/FM for LT03 create transfer order
Hi all,
Has anyone used BAPI/FM for <b>LT03</b> create transfer order based on delivery.
the BAPI/FM should accept <b>multiple line items for individual storage units</b>.
thanks,
Subbathanks Amit....
But it would be helpful to know the usage of this FM....and if anyone has used in their program....
thanks,
Subba -
Can we use BAPI BAPI_ACC_DOCUMENT_POST to upload the vendor invoice?
Hi,
Can anybody tell me, can we use bapi BAPI_ACC_DOCUMENT_POST to upload the vender invoice?
If yes, then which parameters we have to pass, and if no, then which is the other BAPI which is used for
this purpose?
Regards,
MrunalHi Mrunal,
Yes you can use BAPI_ACC_DOCUMENT_POST to upload vendor invoices.
Parameters which are required to be passed are :
Import tab :
DOCUMENTHEADER: Mandatory fields for this specififed in documentation for this.
Table tab:
ACCOUNTGL: Enteries aganist GL account will be populated in this(check documentation for mandatory fields)
ACCOUNTPAYABLE: Enteries aganist vendors will be populated in this(check documentation for mandatory fields)
CURRENCYAMOUNT: in this currency amount aganist GL and vendor entries will specified.
ITEMNO_ACC field will act as identifier as to amount belongs to which GL or vendor enteries.
This much parameter are required to post vendor invoices.
Regards,
Brajvir -
Create goods receipt using bapi fm
hi friends,
i am geetha, i having a problem like while creating the goods receipt .
create a goods receipt without purchase order using the tcode MB1C , I NEED EXACT BAPI function module to create agoods receipt.
my fields are :
posting date
goods receipt issue slip number
movement type
matnr
quantity
units of measure
plant
storage location
can you please suggest me the bapi fm and describe the fm
regards
geetha.follow these links
[link1|http://abap.wikiprog.com/wiki/BAPI_GOODSMVT_CREATE]
[link2|Re: How to use bapi 'BAPI_GOODSMVT_CREATE' in program?;
Regards,
SAPient -
How to use BAPI Program for change workcenter in co02?
Hi Abapers.
Anybody please tell me how to change the workcenter in CO02 using BAPI Programe.
Please give me sample of this.
I will give urs reward of points.
Thanks
Regards,
S.Muthu.Hi,
Use the Function module CR_WORKCENTER_UPDATE
for workcenter change.
It is an update function module so you have to call it in update mode with a COMMIT statement to trigger it.
CALL FUNCTION CR_WORKCENTER_UPDATE IN UPDATE TASK
exporting...
imporing..
COMMIT WORK.
Note: only after the commit statement the function module will be called in update mode.
Regards,
Raj. -
How to update Service Contract using BAPI/FM for ME31K
Hi ,
I am using BAPI BAPI_CONTRACT_CREATE to create contracts.
It works fine, the only problem i am facing is while updating line item with item category "D' its simply skips the item category and create a item. The item category is blank when i see in transaction ME33K.
When i create it using ME31K transaction with line item item category type "D' its ask me to fill the services also for that line item.
My question is is there any BAPI which i can use to update the Services for item line with item category D.
Thanks
AmarHi Amar,
Not sure if this would help you but you can consider writing different logic (probably a BDC) for item category 'D', and use BAPI for all other cases (if 'D' is the only exception).
BAPI documentaion says:
*External services (planned and unplanned services) are not supported.
Creation of configurations is not supported*
Regards,
Shyam -
How to use Bapi BAPI_ACC_DOCUMENT_POST for g/l account document posting
Hi all,
I am using BAPI_ACC_DOCUMENT_POST bapi for g/l account documents posting.as I am first time using BAPI in my program.can anyone give details about how to use this BAPI for document postings.what importing parameters need to be passed , which exporting parameters need to be passed and which tables need to be used.
Thanks in advance.
Regards,
HarshadaModerator message - Please search before asking - post locked
Rob -
Goods movement in QC confirmation for inprocess operation
Dear Friends,
I am doing inprocess inspection for routing operations. After results recording, I get the window where I am entering yield.
If I go to confirmation tab, I can enter the activities and qualntity. But ther I am not getting goods movement tab.
I want assign batch no. to material in the goods movement tab.
How can I get it?
Please help me.
Waiting for reply!
Thanks!
KiranNo Inputs?????
-
Goods Movement through order confirmation for IS oil material
Hello Experts,
I am doing the goods issue posting through the confirmation transaction CORK for process order. The materials that I am posting are IS oil relevant.
When Iam trying to save the confirmation, system is taking to the screen of additional quantity calculation for each materials. When I maintain the details, system is saving the confirmation. But in case if there is a change in the parameters mentioned for additional quantity calculation, system is not giving any option.
In other goods issue transactions, we can see a calculator button which will take us to the quantity calculation screen, if we double click a line item. But I dont find this option in the goods movement screen through order confirmation transactions.
Is there any way to activate it in confirmation screen also, so that we can individually maintain the qty calculation parameters of each goods issue item?.
Appreciate your earliest reply
Thanks & Regards
PrathibNo Inputs?????
-
Good Issue Using BAPI WS_DELIVERY_UPDATE but didn't create accounting doc
Hi Gurus,
i have some problem using BAPI WS_DELIVERY_UPDATE.
in our company. once finance unblock delivery block at sales order then that sales order should be automatic DO/GI.
to accomodate this request i use BAPI BAPI_OUTB_DELIVERY_CREATE_SLS to create DO and BAPI WS_DELIVERY_UPDATE to create GI from DO in one function module. this method was succesfull. +but the problem is when i am only execute BAPI WSDELIVERY_UPDATE to create GI (GI creation failed because : stock deficit,material already lock by another process). the GI document did not create accounting document.+
can any one help me.
thanks in advance
Best Regard,
Akbar.Dear Mr Akbar,
Could we kindly verify for a possible update termination?
The terminated transaction may be re-executed to complete the transaction!!
Regards,
K Gopidas.
Maybe you are looking for
-
I have one computer with Windows 7 and an older version of Firefox, not sure exactly which one. I have never had a problem with saving passwords on it. I now have a new computer with Windows 8.1 and the latest version of Firefox, installed 5.29.14, a
-
How do I delete a MobileMe email account from iPad that has iCloud on it?
I Have an iPhone 4s that I installed iCloud on during the setup process. My iPhone, iPad and PC sync properly. However, my iPad email settings display both the MobileMe and iCloud accounts (with identical settings to each other). Sometimes, the iPad
-
Remove the time stamp in a PDF document
So.... I'm hoping that there's a way to remove the time stamp from a PDF document I'm working on. I can't find it in preferences and a search has been less than fruitful. Any ideas?? Thanks!
-
i'm just wondering if it's possible to put my imac G5 to sleep and still charge my g5 ipod? as i was charging the battery i decided to go to bed so i put the imac to sleep and the ipod stopped charging. in the features guide on the cd it says some ma
-
HT1918 I update my payment info and it still doesn't let buy stuff
I up dated my info and can not buy anything