Probelm with BAPI_GOODSMVT_CREATE
Hi Experts,
I am trying to create a goods reciept with reference to a purchase order, while creating that using BAPI_GOODSMVT_CREATE, I am getting an error "PL Stock in transit exceeded by 100 LB : LC-1114 3000 0001". What does this indicate and how can I resolve it.
I have tried with lesser number of quantaty as well but getting the same error with lesser LB.
Thanks & Regards,
Suma
Hi Suma,
The PO item which u r using in BAPI is already GR'd. Check whether there is any open quantity to be GR'd for material LB : LC-1114 in ME23N PO -> purchase order history tab.
If u find goods receipt document for this line then calculate the remaining open qty = qty in GR document - qty specified in PO line.
if no qty is remaining then use another PO for your testing.
R's,
savitha
Edited by: Savitha Madhavagiri on Mar 11, 2008 3:04 AM
Edited by: Savitha Madhavagiri on Mar 11, 2008 3:04 AM
Similar Messages
-
We are facing some probelms with reports6i
hai,
I am facing some probelms with reports6i.
1.when i try to mail one report it is coming in the 'eps' format.how
can i open this format.
2.we are calling the report using the command line method not
run_product.for these reports 'Generate to File' menu is not working.It say
an error like Umimplemented Error (rep-0999)
3.In one report we are using clob field.but when we take the print output of
this field some of the characters are missing in paper.the problem what we
think is that, there is no entre key padding when a word wrap is
occuring.We have to give it manually which is not applicable in all
cases.Please give some methods to solve these probelms.
Please treat this as an urgent matter.
thanking you,
dilipIf you have not set desformat you will get a file format determined by the driver of your default printer (even though you are not printing !). The file extension always seems to be .eps regardless of whether it is actually an eps (postscript) file.
You can get other formats eg. pdf by setting desformat.
If you do want to work with eps files you can download 'Ghostscript and GSView' which can display and convert them. -
Post Goods Receipt for Inbound Delivery with BAPI_GOODSMVT_CREATE
Hello,
I try to post GR for an Inbound Delivey with BAPI_GOODSMVT_CREATE and it is not working.
I know delivery number and PO number and give both to the bapi.
I am not sure how to set the movement indicator in the item.
When I set it to B.
I do get a shortdump from MB_POST_GOODS_MOVEMENT numer 143, stating that this type of movement is not allowed with this transaction
when setting to L I do get an error stating
"Update control of movement type is incorrect (entry 101 X X _ L)" from message class M7.
Below is the coding for it.
Thank you very much for your help
Michael
* Füllen der Kopfdaten
ls_gm_header-pstng_date = sy-datum.
ls_gm_header-doc_date = sy-datum.
ls_gm_header-ref_doc_no = delivery_header-lifex.
ls_gm_header-bill_of_lading = delivery_header-bolnr.
ls_gm_header-gr_gi_slip_no = delivery_header-xabln.
ls_gm_header-pr_uname = sy-uname.
ls_gm_header-ref_doc_no_long = delivery_header-lifex.
ls_gm_header-bill_of_lading_long = delivery_header-bolnr.
lv_gm_code = '01'.
* Füllen der Positionsdaten
LOOP AT selected_delivery_items INTO ls_delivery_item.
ls_gm_items-material = ls_delivery_item-matnr.
ls_gm_items-plant = ls_delivery_item-werks. " 0001
ls_gm_items-stge_loc = ls_delivery_item-lgort.
ls_gm_items-move_type ='101'. "101
ls_gm_items-entry_qnt = ls_delivery_item-lfimg. " 10,000
ls_gm_items-entry_uom = ls_delivery_item-vrkme.
ls_gm_items-po_number = ls_delivery_item-vgbel. "55001582
ls_gm_items-po_item = ls_delivery_item-vgpos. "00010
ls_gm_items-mvt_ind = 'B'.
ls_gm_items-expirydate = sy-datum + 30 .
ls_gm_items-deliv_numb = ls_delivery_item-vbeln.
ls_gm_items-deliv_item = ls_delivery_item-posnr.
APPEND ls_gm_items TO lt_gm_items.
ENDLOOP.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = ls_gm_header
goodsmvt_code = lv_gm_code
* testrun = 'X'
* GOODSMVT_REF_EWM =
IMPORTING
goodsmvt_headret = ls_gm_header_ret
materialdocument = lv_mat_docno
matdocumentyear = lv_mat_year
TABLES
goodsmvt_item = lt_gm_items
goodsmvt_serialnumber = lt_gm_serial_numbers
return = lt_return
if lt_return is INITIAL.
endif.Hello Pranav,
the input for the business data is correct.
When performing the goods receipt with Migo it works.
I think the B in the movement indicator is correct, but there might be something wrong with the other data.
Best regards
Michael -
PROBELM WITH TYPE X VALUE '20' IN CONCATENATE STATEMENT in ECC version
Hi EXPERTS,
I am working in ECC 6.0 version.
PROBELM WITH TYPE X VALUE '20' IN CONCATENATE STATEMENT in ECC version
C_DEL TYPE X VALUE '09' having solution --C_DEL TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB,
If C_DEL TYPE X VALUE '20' what was the solution in ECC version.
Please let me know. I am awaiting for ur answers
<b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada GalindoHi
welcome to SDN forum
move that X field to a char field and use in concatenation
CONCATENATE works only with CHAR fields
Regards
Anji -
Hi Gurus,
Please help is resolving the PDF issue.
we have many reports in process explorer like view data load status report when selected go from process explorer the report is not displayed in FDQM web browser,instead this is asking for the file to save.
do we need to install anything like adobe reader on the FDM application server? please clarify?
why this is opening up in a separate window or asking for pdf file save? the report should actually be coming up in FDQM web browser.
your help is greatly appreciated.
Thanks and Regards
Maheshi think this was the problem with adobe reader version which i was having, now i have installed 10.1.2 version of adobe acrobat and i am able to view the V9 reports in the browser window but iam still having the probelm with V11 reports it is prompting me to open or save.
is there any specific web setting on the server side we need to do or is it something to do with IE setting?
Thanks for the help
Regards
Mahesh -
ITunes has detected a probelm with your audio configuration. HELP ME
iTunes has detected a probelm with your audio configuration. Audio/Video playback may not operate properly.
help i dont know to fix it.
i cant count how many times i have unistalled itunes and quicktime, and it stills comes up with this probelm. help pleaseA lot of people find that completely removing quicktime and then doing a repair install of iTunes works. The repair install reinstalls quicktime. The secret is to remove quicktime completely not just a simple unistall.
Repair install
Completely uninstall Quicktime (NOT iTunes) using the method in this article:
http://docs.info.apple.com/article.html?artnum=93698
Turn off antivirus/anti spyware
Go to Control Panel>Add/Remove Programs>Change or Remove Programs
Select iTunes, then click on Change, then select Repair.
Restart computer -
Hello i have Iphone 5 but reccently it found the problem on lcd . there are somelines on the screen and i have a probelm with sms and dial No.s
Then you have to bring it back to the country you bought it from. Warranty is not International.
-
Transfer QI stk to blocked stk with BAPI_GOODSMVT_CREATE (Error msg QA495)
Hy,
I would like to create an mass udpate stock program which transfer the QI stock to blocked (because shelf expiration date is passed).
So, i use the BAPI_GOODSMVT_CREATE with movement type 350.
But the following error message appears : "Change the inspection stock of material XXXXXXX to QM only"
Does anyone can suggest me an another solution ?
Thanks in advanceDear LudovicBento
You cannot run this FM as QM stock can be moved only by QA11 tcode. You may try to create a BDC to post the material
from Quality
Regards
Gajesh -
Goods Issue on Process Order with BAPI_GOODSMVT_CREATE
Hi together,
I want to post a goods issue on an process order (some of them are networks) but I have some problem with filling the structures.
Could you please help me?
Book material
ls_bapi_head-pstng_date = ls_booking-budat.
ls_bapi_head-doc_date = sy-datum.
ls_bapi_head-pr_uname = sy-uname.
ls_bapi_item-material = ls_booking-idnrk.
ls_bapi_item-plant = p_werks.
ls_bapi_item-stge_loc = ls_booking-lgort.
ls_bapi_item-entry_qnt = ls_booking-dmeng.
ls_bapi_item-entry_uom = ls_booking-meins.
ls_bapi_item-orderid = ls_booking-aufnr.
ls_bapi_item-mvt_ind = gc_mvt_ind.
IF ls_bapi_item-entry_qnt > 0.
ls_bapi_item-move_type = '261'.
ELSE.
ls_bapi_item-move_type = '262'.
ENDIF.
APPEND ls_bapi_item TO lt_bapi_item.
CLEAR: lt_bapi_ret, ls_bapi_item.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = ls_bapi_head
goodsmvt_code = '03'
testrun = p_test
IMPORTING
materialdocument = ls_mat_bel
TABLES
goodsmvt_item = lt_bapi_item
return = lt_bapi_ret.Here send a example:
DATA: RTR LIKE BAPIRET2.
DATA: G_HEADER LIKE BAPI2017_GM_HEAD_01,
G_CODE LIKE BAPI2017_GM_CODE,
TESTRUN LIKE BAPI2017_GM_GEN-TESTRUN,
G_HEADRET LIKE BAPI2017_GM_HEAD_RET,
MATDOCUMENT TYPE BAPI2017_GM_HEAD_RET-MAT_DOC,
MATYEAR TYPE BAPI2017_GM_HEAD_RET-DOC_YEAR,
G_ITEM TYPE STANDARD TABLE OF BAPI2017_GM_ITEM_CREATE WITH HEADER LINE,
RETURN TYPE STANDARD TABLE OF BAPIRET2 WITH HEADER LINE.
TOMO DATOS DE LA TABLA Z
SELECT * FROM ZCOTT_ACT_VOLUM
INTO CORRESPONDING FIELDS OF TABLE TI_VOLUMEN.
CLEAR: RETURN. REFRESH: RETURN.
CLEAR: WA_MJES.
WA_MJES-ICONID = '@DH@'.
WA_MJES-TYPE = 'S'.
WA_MJES-MSGTXT = 'Errores del Proceso Nro 2'.
APPEND WA_MJES TO TI_MJES.
LOOP AT TI_VOLUMEN INTO WA_VOL.
CLEAR: G_HEADER, G_CODE, TESTRUN, G_HEADRET, MATDOCUMENT,
MATYEAR, G_ITEM.
REFRESH: G_ITEM.
G_HEADER-PSTNG_DATE = WA_VOL-BUDAT. " Fecha de contabilización en el documento
G_HEADER-DOC_DATE = WA_VOL-BLDAT. " Fecha de documento en documento
G_HEADER-REF_DOC_NO = 'REF NRO:'. " Número de documento de referencia
G_HEADER-PR_UNAME = SY-UNAME. " Nombre de usuario
G_HEADER-HEADER_TXT = WA_VOL-BKTXT. " Texto de cabecera de documento
G_CODE = '04'. " Traspaso
Emisor
G_ITEM-MATERIAL = WA_VOL-DE_MATNR. " Nro de Material
G_ITEM-PLANT = WA_VOL-DE_WERKS. " Centro
G_ITEM-STGE_LOC = WA_VOL-DE_LGORT. " Almacen
G_ITEM-MOVE_TYPE = WA_VOL-BWART. " Clase de Mov.
G_ITEM-COSTCENTER = WA_VOL-KOSTL. " Centro de Costo.
G_ITEM-ENTRY_QNT = WA_VOL-MENGE. " Cantidad en unidad de medida de entrada
G_ITEM-ENTRY_UOM = WA_VOL-UNIT. " Unidad de medida de entrada
G_ITEM-ENTRY_UOM_ISO = WA_VOL-UNIT. " Código ISO p.unidad de medida
G_ITEM-BATCH = WA_VOL-DE_LGORT. " Lote
Receptor
G_ITEM-MOVE_MAT = WA_VOL-A_MATNR. " Nro de Material.
G_ITEM-MOVE_PLANT = WA_VOL-A_WERKS. " Centro
G_ITEM-MOVE_STLOC = WA_VOL-A_LGORT. " Almacen
G_ITEM-MOVE_BATCH = WA_VOL-A_LGORT. " Lote
APPEND G_ITEM.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
GOODSMVT_HEADER = G_HEADER
GOODSMVT_CODE = G_CODE
TESTRUN = ' ' "TESTRUN
IMPORTING
GOODSMVT_HEADRET = G_HEADRET
MATERIALDOCUMENT = MATDOCUMENT
MATDOCUMENTYEAR = MATYEAR
TABLES
GOODSMVT_ITEM = G_ITEM
RETURN = RETURN.
CLEAR: RTR.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = RTR.
LOOP AT RETURN.
CLEAR: WA_MJES.
WA_MJES-TYPE = RETURN-TYPE.
CASE WA_MJES-TYPE.
WHEN 'S'.
WA_MJES-ICONID = '@08@'.
WHEN 'W'.
WA_MJES-ICONID = '@09@'.
WHEN 'E'.
WA_MJES-ICONID = '@0A@'.
ENDCASE.
WA_MJES-MSGTXT = RETURN-MESSAGE.
APPEND WA_MJES TO TI_MJES.
ENDLOOP.
ENDLOOP. -
Problem with BAPI_GOODSMVT_CREATE not updating Reservation
Hi,
When i do a manual MB1A 'Goods issue' with reference to Work Order it is posting the goods issue and updating the RESB ,but when i do the same through the bapi code 03 Table i was not able to post the goods issue at all. am i missing a input field in the bapi .Plz help me out.
My code.
gf_goodsmvt_code-gm_code = '03'. "GI
gf_goodsmvt_header-pstng_date = sy-datum.
gf_goodsmvt_header-doc_date = sy-datum.
LOOP AT it_details INTO gf_details .
MOVE :gf_details-matnr TO gf_goods-material,
gf_details-werks TO gf_goods-plant,
rm07m-lgort TO gf_goods-stge_loc,
gf_details-charg TO gf_goods-batch,
rm07m-bwart TO gf_goods-move_type.
MOVE gf_details-issue_qty TO gf_goods-entry_qnt .
MOVE gf_details-meins TO gf_goods-entry_uom.
gf_goods-mvt_ind = 'F'.
gf_goods-reserv_no = gf_details-rsnum.
gf_goods-res_item = gf_details-posnr.
gf_goods-res_type = gf_details-rsart.
gf_goods-withdrawn = 'X'.
gf_goods-orderid = rm07m-aufnr.
gf_goods-order_itno = 1.
APPEND gf_goods TO it_goodsmvt_item.
CLEAR gf_goods.
ENDLOOP.
IF NOT it_goodsmvt_item[] IS INITIAL.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = gf_goodsmvt_header
goodsmvt_code = gf_goodsmvt_code
TESTRUN = ' '
IMPORTING
GOODSMVT_HEADRET =
materialdocument = g_mat_doc
MATDOCUMENTYEAR =
TABLES
goodsmvt_item = it_goodsmvt_item
GOODSMVT_SERIALNUMBER = 'X'
return = it_return.check below Threads :
Issue related to EXIT statement
and see the sample program :
Structures for BAPI
data: gdsmt_header like bapi2017_gm_head_01.
data: gdsmt_code like bapi2017_gm_code.
data: gdsmt_headret like bapi2017_gm_head_ret.
data: gdsmt_item like bapi2017_gm_item_create occurs 1 with header line.
data: return like bapiret2 occurs 0.
data: retmatdoc like bapi2017_gm_head_ret-mat_doc.
Setup BAPI header data.
gdsmt_header-pstng_date = sy-datum.
gdsmt_header-doc_date = sy-datum.
gdsmt_code-gm_code = '06'. " MB11
Write 262 movement to table.
clear gdsmt_item.
move '262' to gdsmt_item-move_type.
move i_resb-matnr to gdsmt_item-material.
move p_bdmng to gdsmt_item-entry_qnt.
move i_resb-meins to gdsmt_item-entry_uom.
move i_resb-werks to gdsmt_item-plant.
move i_resb-lgort to gdsmt_item-stge_loc.
move i_afko-aufnr to gdsmt_item-orderid.
append gdsmt_item.
Determine cost center
move '0000041430' to gdsmt_item-costcenter.
append gdsmt_item.
Call goods movement BAPI
call function 'BAPI_GOODSMVT_CREATE'
exporting
goodsmvt_header = gdsmt_header
goodsmvt_code = gdsmt_code
importing
goodsmvt_headret = gdsmt_headret
materialdocument = retmatdoc
tables
goodsmvt_item = gdsmt_item
return = return.
Reward Points if it is helpful
Thanks
Seshu -
Solved Create goodsmovement with BAPI_GOODSMVT_CREATE
Hello,
I want to create a goods movement with the BAPI 'BAPI_GOODSMVT_CREATE'. Buth when I fill in the parameters I got the error message "No goods receipt possible for purchase order 4076601 00001". But when I book the PO in the MIGO I don't get anny errors?
So what could bewrong on my code:
FORM insert_best
TABLES P_IT_ONTV_BEST LIKE it_ontv_best[]
USING P_TSTRUN TYPE c.
DATA: p_wa_ontv_best TYPE t_ontv_best.
BAPI TYPES
DATA: BAPIGMHEAD LIKE BAPI2017_GM_HEAD_01,
BAPIGMCODE LIKE BAPI2017_GM_CODE,
BAPIGMHEADRET LIKE BAPI2017_GM_HEAD_RET.
DATA: BEGIN OF XIMSEG OCCURS 1.
INCLUDE STRUCTURE BAPI2017_GM_ITEM_CREATE.
DATA: END OF XIMSEG.
DATA: BEGIN OF XEMSEG OCCURS 1.
INCLUDE STRUCTURE BAPIRET2.
DATA: END OF XEMSEG.
DATA: l_prev_ebeln LIKE EKPO-EBELN. " Voorgaande bestelnummer
LOOP AT p_it_ontv_best into p_wa_ontv_best.
" Per bestelling worden de ontvangsten ingeboekt.
IF not l_prev_ebeln is initial
and l_prev_ebeln <> p_wa_ontv_best-ebeln.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
GOODSMVT_HEADER = BAPIGMHEAD
GOODSMVT_CODE = BAPIGMCODE
TESTRUN = P_TSTRUN
IMPORTING
GOODSMVT_HEADRET = BAPIGMHEADRET
MATERIALDOCUMENT =
MATDOCUMENTYEAR =
TABLES
GOODSMVT_ITEM = XIMSEG
GOODSMVT_SERIALNUMBER =
RETURN = XEMSEG
LOOP AT XEMSEG.
g_ERROR_IN_MODUL_ABLAUF_IW8W = 'X'.
MESSAGE ID XEMSEG-ID TYPE XEMSEG-TYPE
NUMBER XEMSEG-NUMBER
WITH XEMSEG-MESSAGE_V1
XEMSEG-MESSAGE_V2
XEMSEG-MESSAGE_V3
XEMSEG-MESSAGE_V4.
ENDLOOP.
clear BAPIGMHEAD. " Maak de header items schoon
clear XIMSEG. " Maak de item regels schoon
ELSE.
" Initiele waarden
BAPIGMHEAD-pstng_date = sy-datum.
BAPIGMHEAD-doc_date = sy-datum.
BAPIGMHEAD-pr_uname = sy-uname.
BAPIGMHEAD-header_txt = 'Goederenontvangst gasflessen.'.
BAPIGMHEAD-ref_doc_no = p_wa_ontv_best-xblnr.
BAPIGMHEAD-bill_of_lading = p_wa_ontv_best-frbnr.
BAPIGMHEAD-gr_Gi_slip_no = p_wa_ontv_best-xabln.
ENDIF.
Met deze fuctie worden alleen goederenbewegingen 101
gedaan voor bestellingen.
BAPIGMCODE-GM_CODE = '01'. " Voorbestellingen
XIMSEG-MOVE_TYPE = '101'. " Goederenontvangst
XIMSEG-PLANT = '0010'.
XIMSEG-PO_NUMBER = 4076601. "p_wa_ontv_best-ebeln.
XIMSEG-PO_ITEM = 1. "p_wa_ontv_best-ebelp.
XIMSEG-MVT_IND = 'B'. " Goodsreceipt for
" Purchase order.
XIMSEG-ENTRY_QNT = 1. "p_wa_ontv_best-menge.
XIMSEG-ENTRY_UOM = 'CIL'. "p_wa_ontv_best-meins.
XIMSEG-UNLOAD_PT = p_wa_ontv_best-ablad.
XIMSEG-PROD_DATE = p_wa_ontv_best-prod_dat.
XIMSEG-EXPIRYDATE = p_wa_ontv_best-keur_dat.
append XIMSEG.
" bewaar het voorgaande bestelnummer
l_prev_ebeln = p_wa_ontv_best-ebeln.
ENDLOOP.
clear XEMSEG.
IF not l_prev_ebeln is initial.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
GOODSMVT_HEADER = BAPIGMHEAD
GOODSMVT_CODE = BAPIGMCODE
TESTRUN = P_TSTRUN
IMPORTING
GOODSMVT_HEADRET = BAPIGMHEADRET
MATERIALDOCUMENT =
MATDOCUMENTYEAR =
TABLES
GOODSMVT_ITEM = XIMSEG
GOODSMVT_SERIALNUMBER =
RETURN = XEMSEG
LOOP AT XEMSEG.
g_ERROR_IN_MODUL_ABLAUF_IW8W = 'X'.
MESSAGE ID XEMSEG-ID TYPE XEMSEG-TYPE
NUMBER XEMSEG-NUMBER
WITH XEMSEG-MESSAGE_V1
XEMSEG-MESSAGE_V2
XEMSEG-MESSAGE_V3
XEMSEG-MESSAGE_V4.
ENDLOOP.
clear XEMSEG.
ENDIF.
ENDFORM. " insert_best
Many thanks in advanced.
Kind regards,
Richard Meijn
Message was edited by: R. MeijnYou could do a conversion routine against. Use the function module
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = p_wa_ontv_best-ebeln
IMPORTING
OUTPUT = p_wa_ontv_best-ebeln
I wondering why p_it_ontv_best/p_wa_ontv_best doesn't have the formatted version to begin with. I would need to see all your code to tell.
Regards,
Rich Heilman
Message was edited by: Rich Heilman -
Problem with BAPI_GOODSMVT_CREATE and MAA
Hi experts,
I'm trying to GR a PO with MAA (Multiple Account Assingment) by using BAPI_GOODSMVT_CREATE.
My problem is that, as is a return delivery, BAPI is checking wether the reference doc, position and year have been populated for the MAA related positions.
This is done in method CL_MMIM_MAA_2 --> MAA_ITEM_DUPLICATOR_BAPI. As ain't populating those fields, BAPI returns error message M7 465 and not EM document is created.
But, when doing the same by using MIGO transaction, document is created as there is not validation for reference document, because MIGO is using method CL_MMIM_MAA_2 --> MAA_ITEM_DUPLICATOR_MIGO.
I've ssearched fot SAP NOTES (1654305) and SCN posts, with no results.
Can someone explain how to do a return delivery with MAA by using BAPI_GOODSMVT_CREATE?. Is there any way to avoid the validation when using the BAPI?.
Thank you so much in advance.
Regards,
Carlos.Hi,
I think the reason and the solution for the error M7 465 is well explained in the note: 1654305 - MAA2 error M7 599 during return delivery GR with BAPI
If the note is applicable for you and still the problem is not solved with the note, you may cross check the changes mentioned in the note and you may raise an OSS ticket to SAP.
Regards,
AKPT -
Help with BAPI_GOODSMVT_CREATE
I am trying to post a goods receipt from a PO using BAPI_GOODSMVT_CREATE. The material document gets created, but no output form gets generated. If I do the goods receipt through MB01, everything works correctly. I have gv_bapi2017_gm_head-ver_gr_gi_slip = '1' and gt_bapi2017_gm_item-nb_slips = 1. Any thoughts?
HI,
See the below program, you may get solutions,
<b>BAPI_GOODSMVT_CREATE to post Goods Movement :-</b>
* BAPI TO Upload Inventory Data
* GMCODE Table T158G - 01 - MB01 - Goods Receipts for Purchase Order
* 02 - MB31 - Goods Receipts for Prod Order
* 03 - MB1A - Goods Issue
* 04 - MB1B - Transfer Posting
* 05 - MB1C - Enter Other Goods Receipt
* 06 - MB11
* Domain: KZBEW - Movement Indicator
* Goods movement w/o reference
* B - Goods movement for purchase order
* F - Goods movement for production order
* L - Goods movement for delivery note
* K - Goods movement for kanban requirement (WM - internal only)
* O - Subsequent adjustment of "material-provided" consumption
* W - Subsequent adjustment of proportion/product unit material
report zbapi_goodsmovement.
parameters: p-file like rlgrap-filename default
'c:sapdataTEST.txt'.
parameters: e-file like rlgrap-filename default
'c:sapdatagdsmvterror.txt'.
parameters: xpost like sy-datum default sy-datum.
data: begin of gmhead.
include structure bapi2017_gm_head_01.
data: end of gmhead.
data: begin of gmcode.
include structure bapi2017_gm_code.
data: end of gmcode.
data: begin of mthead.
include structure bapi2017_gm_head_ret.
data: end of mthead.
data: begin of itab occurs 100.
include structure bapi2017_gm_item_create.
data: end of itab.
data: begin of errmsg occurs 10.
include structure bapiret2.
data: end of errmsg.
data: wmenge like iseg-menge,
errflag.
data: begin of pcitab occurs 100,
ext_doc(10), "External Document Number
mvt_type(3), "Movement Type
doc_date(8), "Document Date
post_date(8), "Posting Date
plant(4), "Plant
material(18), "Material Number
qty(13), "Quantity
recv_loc(4), "Receiving Location
issue_loc(4), "Issuing Location
pur_doc(10), "Purchase Document No
po_item(3), "Purchase Document Item No
del_no(10), "Delivery Purchase Order Number
del_item(3), "Delivery Item
prod_doc(10), "Production Document No
scrap_reason(10), "Scrap Reason
upd_sta(1), "Update Status
end of pcitab.
call function 'WS_UPLOAD'
exporting
filename = p-file
filetype = 'DAT'
* IMPORTING
* FILELENGTH =
tables
data_tab = pcitab
* EXCEPTIONS
* FILE_OPEN_ERROR = 1
* FILE_READ_ERROR = 2
* NO_BATCH = 3
* GUI_REFUSE_FILETRANSFER = 4
* INVALID_TYPE = 5
* OTHERS = 6
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
exit.
endif.
gmhead-pstng_date = sy-datum.
gmhead-doc_date = sy-datum.
gmhead-pr_uname = sy-uname.
gmcode-gm_code = '01'. "01 - MB01 - Goods Receipts for Purchase Order
loop at pcitab.
itab-move_type = pcitab-mvt_type.
itab-mvt_ind = 'B'.
itab-plant = pcitab-plant.
itab-material = pcitab-material.
itab-entry_qnt = pcitab-qty.
itab-move_stloc = pcitab-recv_loc.
itab-stge_loc = pcitab-issue_loc.
itab-po_number = pcitab-pur_doc.
itab-po_item = pcitab-po_item.
concatenate pcitab-del_no pcitab-del_item into itab-item_text.
itab-move_reas = pcitab-scrap_reason.
append itab.
endloop.
loop at itab.
write:/ itab-material, itab-plant, itab-stge_loc,
itab-move_type, itab-entry_qnt, itab-entry_uom,
itab-entry_uom_iso, itab-po_number, itab-po_item,
pcitab-ext_doc.
endloop.
call function 'BAPI_GOODSMVT_CREATE'
exporting
goodsmvt_header = gmhead
goodsmvt_code = gmcode
* TESTRUN = ' '
* IMPORTING
goodsmvt_headret = mthead
* MATERIALDOCUMENT =
* MATDOCUMENTYEAR =
tables
goodsmvt_item = itab
* GOODSMVT_SERIALNUMBER =
return = errmsg
clear errflag.
loop at errmsg.
if errmsg-type eq 'E'.
write:/'Error in function', errmsg-message.
errflag = 'X'.
else.
write:/ errmsg-message.
endif.
endloop.
if errflag is initial.
commit work and wait.
if sy-subrc ne 0.
write:/ 'Error in updating'.
exit.
else.
write:/ mthead-mat_doc, mthead-doc_year.
perform upd_sta.
endif.
endif.
* FORM UPD_STA *
form upd_sta.
loop at pcitab.
pcitab-upd_sta = 'X'.
modify pcitab.
endloop.
call function 'WS_DOWNLOAD'
exporting
filename = p-file
filetype = 'DAT'
* IMPORTING
* FILELENGTH =
tables
data_tab = pcitab
* EXCEPTIONS
* FILE_OPEN_ERROR = 1
* FILE_READ_ERROR = 2
* NO_BATCH = 3
* GUI_REFUSE_FILETRANSFER = 4
* INVALID_TYPE = 5
* OTHERS = 6
endform.
Regards
Sudheer -
Transportation probelms with objects
Hi
most of objects we installed bsuiness content, and migrated to 7.0 and amde some enhancements and moving quality each time request is getting failed like some objects are inactive for each module. its defficult to check each object ( char and its contain attributes are active ior not)
is theer any process i can check while collecting what are objects are inactive?
2nd probelm is
i replicated all datasource from ecc quality to BI quality
then i am sending migration an dactive version of datasource to BI quality
i am collecting all flow. why while transportating again data source is going source system for replication process?
any setting we need to adjust, bec its taking long time
ple let em knowHi,
1. First you check all master data InfoObjects are Active or not?. Eg: take 0MATERIAL and check all Objects with in that i.e. Attributes, NaviGational...are active or not?. In this way you collect all InfoObejcts Information in one Excel sheet and then Transport all Ativated InfoOBjects to BI Qty.Then you send all Cubes/DSO's and so on....
2. First you Transport the datasources from ECC Dev to ECC Qty and then Replicate all DS'S in BI Qty system and then You transport the Transfer/Update/Tranformations/DTPS from BI Dev to BI Qty.
Thanks
Reddy -
Never ending Probelms with JSF
Hi,
I was just wondering if JSF is all hype but has no real value in it.
I have been using for about 3 months. I have faced problems with it at almost every stage.
1. Validators / Converters are not mature ( Why there is no attempt to integrate mature stuff like Commons-Validator which is already available. I am sure that every one of us agrees that vadation is very important for all web applications. I am aware that it possible to implement custom validators with JSF. But I feel the most comonly used ones should be available off the shelf.
2. Consider
<h:inputText id="text2" value="Please enter your text" rendered="false"/>
If the rendered attribute cannot take a runtime expression value ... what is good for or what is the prupose behind having such an attribute ..... !!!!. This is just one instance there are many situations like this.
I need to be able to choose whether a text field is rendered or not based on boolean value that is available as request attribute.
3. There are innumerable probelms when we Tiles with JSF components.. For example if we have html content interleaved between JSF component tags. ... The Layout inspite of having proper definitions does not get rendered properly....The implementation of JSF Panel Grid is too restritced...
4. There are many people out there implementing JSF components but they are buggy / incomatible with other implementations.... take for example ourfaces , myfaces , JSF reference implementation and Oracle's ADF are NOT compatible with each other... so what is this all about...
Does anybody here have an idea as to how much time it would take for JSF to become stable enough to be used for Production applications...
Any comments / suggestions are welcome
Thanks in advance,
Ram Kishore.Hi,
I was just wondering if JSF is all hype but has no
real value in it.
I have been using for about 3 months. I have faced
problems with it at almost every stage.
1. Validators / Converters are not mature ( Why there
is no attempt to integrate mature stuff like
Commons-Validator which is already available. I am
sure that every one of us agrees that vadation is very
important for all web applications. I am aware that it
possible to implement custom validators with JSF. But
I feel the most comonly used ones should be available
off the shelf.More off-the-shelf validators would be good, I agree.
2. Consider
<h:inputText id="text2" value="Please enter your text"
rendered="false"/>
If the rendered attribute cannot take a runtime
expression value ... what is good for or what is the
prupose behind having such an attribute ..... !!!!.
This is just one instance there are many situations
like this."rendered" does support dynamic values; just use #{} EL expressions.
I need to be able to choose whether a text field is
rendered or not based on boolean value that is
available as request attribute.
3. There are innumerable probelms when we Tiles with
JSF components.. For example if we have html content
interleaved between JSF component tags. ... The Layout
inspite of having proper definitions does not get
rendered properly....The implementation of JSF Panel
Grid is too restritced...I think you're describing two separate problems here:
(1) Needing <f:verbatim> is annoying. We (the EG) know; we're working on it.
(2) More panel renderers would be good; you can look to component libraries (ADF Faces as one) for additional layouts.
4. There are many people out there implementing JSF
components but they are buggy / incomatible with other
implementations.... take for example ourfaces ,
myfaces , JSF reference implementation and Oracle's
ADF are NOT compatible with each other... so what is
this all about...OK, hold up here. There's some lump of claims here, and I don't know what you're specifically saying. It sounds as though you're saying component developers are writing buggy code, and therefore don't work with every implementation. With regards to Oracle's ADF Faces, we of course work with the JSF RI. We're close to working with MyFaces, but there's some issues remaining in MyFaces (perhaps already resolved) that block this. These aren't ADF Faces bugs. Expecting MyFaces to be perfectly compatible when it is not yet certified or described as production level is infeasible.
(I can't speak for ourfaces.)
-- Adam Winer (JSF EG, and ADF Faces)
Does anybody here have an idea as to how much time it
would take for JSF to become stable enough to be used
for Production applications...
Any comments / suggestions are welcome
Thanks in advance,
Ram Kishore.
Maybe you are looking for
-
Sharing a DVI LCD monitor between a MDD & AGP Macs, recommendations?
Hi all, In the not so near future, I'm looking to share a large(42) LCD monitor with DVI ports between my MDD and AGP Macs. My AGP Mac has the Geforce nividia 4600,64MB video card and the MDD has the ATI 9000PRO, 64mb video card via a dvi switch box.
-
Tax Declaration Setup Usage UK Version
How can i use Tax code created in Tax Declaration Setup in an Invoice? I have created a Tax code in Administration>Setup>Financials>Tax>Tax Declaration Boxes with Formula i.e. TC = V1+V2 where V1 and V2 are existing valid Tax code created in Administ
-
How to order a calendar and a book in one order?
I have created a book and a calendar and I want to order both in one order, so that I don´t have to pay twice the shipping fee. Iphoto 9.6.
-
How much will i be charged for this album pre-order
4 of the songs for ultraviolence have already been released. how much will i be charged for the rest of the album if there are 11 songs remaining?
-
Photoshop elements 2 print preview dialog box
I'm running PSE 2 on a PC with Windows XP and an old Dell monitor with 800x600 resolution. Problem: when I check the "More Options box, the box cuts off at "Print Space" And I can't control communication between PSE and the printer. I've fooled w