LSMW/BDC FOR MIGO
Hello Friends,
I have created LSMW (recording) for Migo Transaction .
After running the LSMW it is not storing data for fields BED,SED,ECS in Excise ItemTab in Migo.
I have also created a BDC and done recording through SHDB.
But still the problem remains the same.After running BDC also it is not storing data for fields BED,SED,ECS in Excise ItemTab in Migo.
I have run the BDC/LSMW in foreground mode where it places the values to the corresponding fields
but does not save it.
But Manually doing Migo Transaction it stores the values for above field.
Hi,
WA_GOODSMVT_ITEM-MATERIAL = P_MATNR. "'000000000000001556'.
WA_GOODSMVT_ITEM-PLANT = P_WERK. " '1000'.
WA_GOODSMVT_ITEM-STGE_LOC = P_LGORT. " '0001'.
WA_GOODSMVT_ITEM-MOVE_TYPE = 'Z42'.
WA_GOODSMVT_ITEM-VENDOR = P_ZZORG. "'0000100224'.
WA_GOODSMVT_ITEM-ENTRY_QNT = P_BAG. " '1'.
WA_GOODSMVT_ITEM-ENTRY_UOM = S_MARA-MEINS.
WA_GOODSMVT_ITEM-ENTRY_UOM_ISO = S_MARA-MEINS.
WA_GOODSMVT_ITEM-MOVE_PLANT = P_WERKS.
APPEND WA_GOODSMVT_ITEM TO T_GOODSMVT_ITEM.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
GOODSMVT_HEADER = T_GOODSMVT_HEADER
GOODSMVT_CODE = T_GOODSMVT_CODE
IMPORTING
MATERIALDOCUMENT = V_MATERIAL
TABLES
GOODSMVT_ITEM = T_GOODSMVT_ITEM
RETURN = T_RETURN.
EXPORT t_return to MEMORY ID '123'.
EXPORT V_MATERIAL TO MEMORY ID 'MAT'.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = ' '.
Thanks,
Shailaja Ainala.
Similar Messages
-
BDC for MIGO for GR OutBound Delivery( A01 & R05 ) from Movement Type 107 to 109
Hi,
I am stuck with a very typical situation need all your expertise and advices for a solution.
We are basically trying to create change the movement type from 107 to 109 through MIGO.
I have made a BDC recording for MIGO ( because we would like to track each delivery specifically under shipment , I know that there is a BAPI which is there to do this but it works fine if we do the shipment with Purchase Order as input which dont want in that manner )
Process:
1. Creating Production Order
2. Creating Purchase Order
3. Creating STO
4. Deliveries
5. PGI for Deliveries
6. Shipment for group of outbound Deliveries
I have created a z program where i am passing shipment number in the selection screen.
Then it would take all the deliveries for that shipment and pass each delivery to MIGO and process it and change the status from 107 to 109.
Interesting part here is, the code works absolutely perfect only from my ID. But when I test from other ID it is not executing, so to check where is the problem I have added mess_tab to the CALL TRANSACTION to capture what message is been populated for my ID comparing with others
Message Captured on Others ID's:
MSGID: 00
MSGNR: 344
MSGV1: SAPLMIGO
MSGV2: 1300
Message Captured on MY ID:
MSGID: MIGO
MSGNR: 012
MSGV1: 5000005802
MSGV2: (empty)
This is the problem this program is executing only on MY ID, rest all ID's it is not processing.
We have cross verified with security and basis regarding any authorization issues but nothing came up.
Please help me what could be the issue ( WHY it is processing successfully for my and WHY NOT for other ID's)
Below is the main code :
CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL' " Converting Date format to DD/MM/YYYY
EXPORTING
DATE_INTERNAL = sy-datum
IMPORTING
DATE_EXTERNAL = lv_date_external
EXCEPTIONS
DATE_INTERNAL_IS_INVALID = 1
OTHERS = 2.
IF SY-SUBRC <> 0. "#EC NEEDED
* Implement suitable error handling here
ENDIF.
* Validating input shipment number with database table VTTP
SELECT VTTP~TKNUM
VTTP~TPNUM
VTTP~VBELN
FROM VTTP INNER JOIN VTTK
ON VTTP~TKNUM = VTTK~TKNUM
INTO TABLE IT_VTTP
WHERE VTTK~TKNUM = P_TKNUM
AND VTTK~STDIS = 'X'.
IF sy-subrc = 0.
* Validating all deliveries having same Delivery type or not
SELECT * FROM likp INTO TABLE it_likp FOR ALL ENTRIES IN it_vttp WHERE vbeln = it_vttp-vbeln
AND vbtyp = 'J'.
IF sy-subrc = 0.
CLEAR lv_lines.
LOOP AT it_likp INTO wa_likp.
REFRESH:it_vbfa,BDCDATA.
* Validating if Delivery Type = 109 (GR already done), or Delivery Type = 107 (must process for GR )
SELECT * FROM vbfa INTO TABLE it_vbfa WHERE vbelv = wa_likp-vbeln
* AND vbtyp_v = 'J'
AND bwart = '109'.
IF sy-subrc = 0.
lv_flag1 = 'X'.
ELSE.
SELECT * FROM vbfa INTO TABLE it_vbfa WHERE vbelv = wa_likp-vbeln
* AND vbtyp_v = 'J'
AND bwart = '107'.
IF sy-subrc NE 0.
MESSAGE 'No Deliveries with Movement Type "107" ' TYPE 'I'.
ELSE.
lv_flag2 = 'X'.
lv_lines = lv_lines + 1.
** BDC for MIGO
perform bdc_dynpro using 'SAPLMIGO' '0001'.
perform bdc_field using 'BDC_OKCODE'
'=OK_GO'.
perform bdc_field using 'GODYNPRO-ACTION'
'A01'.
perform bdc_field using 'GODYNPRO-REFDOC'
'R05'.
perform bdc_field using 'GODEFAULT_TV-BWART'
'109'.
perform bdc_field using 'BDC_CURSOR'
'GODYNPRO-OUTBOUND_DELIVERY'.
perform bdc_field using 'GODYNPRO-OUTBOUND_DELIVERY'
wa_likp-vbeln. "'80019574'.
perform bdc_field using 'GOHEAD-BLDAT'
lv_date_external. "'04/29/2015'.
perform bdc_field using 'GOHEAD-BUDAT'
lv_date_external. "'04/29/2015'.
perform bdc_field using 'GOHEAD-WEVER'
'1'.
perform bdc_dynpro using 'SAPLMIGO' '0001'.
perform bdc_field using 'BDC_OKCODE'
'=OK_POST1'.
perform bdc_field using 'GODEFAULT_TV-BWART'
'109'.
perform bdc_field using 'GOHEAD-BLDAT'
lv_date_external. "'04/29/2015'.
perform bdc_field using 'GOHEAD-LFSNR'
wa_likp-vbeln. "'0080019574'.
perform bdc_field using 'GOHEAD-BUDAT'
lv_date_external. "'04/29/2015'.
perform bdc_field using 'GOHEAD-WEVER'
'1'.
perform bdc_field using 'GODYNPRO-DETAIL_ZEILE'
' 1'.
perform bdc_field using 'GOITEM-ERFME'
'EA'.
perform bdc_field using 'GOITEM-ERFMG'
'1'.
perform bdc_field using 'GOITEM-LSMNG'
'1'.
perform bdc_field using 'GOITEM-LSMEH'
'EA'.
perform bdc_field using 'GOITEM-MIGO_ELIKZ'
'1'.
perform bdc_field using 'GOITEM-BWART'
'109'.
perform bdc_field using 'GOITEM-LGOBE'
'RX Cross-docking'.
perform bdc_field using 'BDC_CURSOR'
'GODYNPRO-DETAIL_TAKE'.
perform bdc_field using 'GODYNPRO-DETAIL_TAKE'
'X'.
PERFORM bdc_dynpro USING 'SAPLMIGO' '1300'.
PERFORM bdc_field USING 'BDC_CURSOR'
'G_TIP_DONT_SHOW_AGAIN'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=OK_TIP_GO'.
PERFORM bdc_field USING 'G_TIP_DONT_SHOW_AGAIN'
'X'.
*& Avoid unncessary screens to populate while processing background.
LV_OPTIONS-DISMODE = 'N'.
LV_OPTIONS-UPDMODE = 'S'.
LV_OPTIONS-NOBINPT = 'X'.
CALL TRANSACTION 'MIGO' USING BDCDATA OPTIONS FROM LV_OPTIONS MESSAGES INTO IT_MESSTAB1 .
WAIT UP TO 1 SECONDS.
DELETE IT_MESSTAB1 WHERE MSGTYP NE 'E'.
IF IT_MESSTAB1[] IS NOT INITIAL.
APPEND LINES OF IT_MESSTAB1 TO IT_MESSTAB.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
ELSE.
MESSAGE 'Shipment Number does not exists Or not Planned' TYPE 'E'.
ENDIF.
ELSE.
MESSAGE 'Please insert Shipment Number' TYPE 'E'.
ENDIF.
IF lv_flag1 = 'X' AND lv_flag2 = 'X'.
MESSAGE 'This shipment is processed with an inconsistent goods receipt' TYPE 'I'.
ELSEIF lv_flag1 = 'X'.
MESSAGE 'Shipment already been processed for these deliveries' TYPE 'I'.
ELSEIF lv_flag2 = 'X'.
lv_lines1 = lv_lines.
CONDENSE lv_lines1 NO-GAPS .
CONCATENATE lv_lines1 'Goods Receipt are posted for the shipment '
INTO lv_message SEPARATED BY space.
MESSAGE lv_message TYPE 'I'.
ENDIF.
* Display Messages from Message TAB.
DELETE ADJACENT DUPLICATES FROM IT_MESSTAB.
DATA:lv_msg TYPE string.
LOOP AT IT_MESSTAB INTO WA_MESSTAB.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = WA_MESSTAB-MSGID
NO = WA_MESSTAB-MSGNR
V1 = WA_MESSTAB-MSGV1
V2 = WA_MESSTAB-MSGV2
V3 = WA_MESSTAB-MSGV3
V4 = WA_MESSTAB-MSGV4
IMPORTING
MSG = lv_msg
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
WRITE:/ lv_msg.
ENDLOOP.
* Start new screen *
FORM BDC_DYNPRO USING PROGRAM DYNPRO. "#EC PF_NO_TYPE
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM.
* Insert field *
FORM BDC_FIELD USING FNAM FVAL. "#EC PF_NO_TYPE
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDFORM.
Thanks,
SriniHi Rob,
Thanks for quick reply.
I have checked the NOTE : 304122
But there in the NOTE it says ( " BAPI, BAPI_GOODSMVT_CANCEL, BAPI_GOODSMVT_CREATE, CNTL_ERROR" )
These BAPI's work perfectly for (purchase order as input type), but here out type is ( A01 & R05 ) we are giving DELIVERY NUMBER as input to MIGO.
So for this scenario we cannot use those BAPI's mentioned in the NOTE.
Also as stated earlier in the message interesting part is
"The code works absolutely perfect only from my ID. But when I test from other ID it is not executing. Code is working exactly as expected ONLY to my ID. When i try to execute the same code from another's ID it is not working"
So what do you think might be the issue? -
Hi All,
I am trying to create BDC for MIGO T-code.But in recording part i am facing some problem
recording steps : 1 .I am putting putting Purchasing Document Number.
2. Press enter.
3 Delivery Note
4. Bill of lading
5. GR/GI Slip No
6. then in second part of screen i select batch tab and click on classification here i am
geeting problem in normal way when we click this classification button new screen open in which we put values and then new batch is create but in recording after click on classification
that screen is not coming so please can any body tell how can i populate this classification screen.
and put my values so migo process end.
Regards
AnkitUse this code
l_meins = 'EA'.
l_wa_goodsmvt_header-pstng_date = sy-datum.
l_wa_goodsmvt_header-doc_date = sy-datum.
l_wa_goodsmvt_item-move_type = '555'.
l_wa_goodsmvt_item-move_plant = '2000' " Receiving plant
l_wa_goodsmvt_item-move_stloc = '0700'. " Receiving SLoc
l_wa_goodsmvt_item-material = wa_ret_order-zzmat_no.
l_wa_goodsmvt_item-entry_qnt = wa_ret_order-zzqty_entered.
l_wa_goodsmvt_item-plant = wa_ret_order-zzissu_plant. " Plant
l_wa_goodsmvt_item-stge_loc = wa_ret_order-zzissu_strg_loc.
l_wa_goodsmvt_item-entry_uom = l_meins.
l_wa_goodsmvt_item-entry_uom_iso = l_meins.
l_wa_goodsmvt_item-costcenter = wa_ret_order-kostl.
APPEND l_wa_goodsmvt_item TO l_i_goodsmvt_item.
l_goodsmvt_code-gm_code = '03'.
* Migo posting
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = l_wa_goodsmvt_header
goodsmvt_code = l_goodsmvt_code
IMPORTING
goodsmvt_headret = l_wa_goodsmvt_headret
materialdocument = l_materialdocument
TABLES
goodsmvt_item = l_i_goodsmvt_item
return = l_i_return.
* Commit the changes
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = c_check.
This code is mainly for creating STO
Thanks
Amitava -
BDC FOR MIGO (Out Bond Delivery)
Hello Experts ,
I am trying to Make new BDC for Migo A01 -
R05(Outbond Delivery) , Every Thing Is going Fine But in last whn i am trying to change Excise Invoice(03 only capture excise invoice -
to----> 05 only part1) its not working .At the time of Recording everything was ok . but when i am trying to process the recording its shows 05 only part 1 but not disable the fields of 03 capture excise .
Thanks.
Regards: Hemant Gulati(A1)Sorry Experts It Solved. Actually I was also Passing Excise Group.
Thread Closed -
Hi,
For Goods reciept for Kanban material there is transaction called PKBC. Inside this transaction we wrote two BDC's i.e One for MIGO (with only Part1) & J1iex(Capturing & posting the excise invoice). After running this we found that accounting document contains all the entries including Part2. But During MIRO we are not getting excise amount which is payable to the vendor.
Please help me to resolve this. Incase if you need any clarification please ket me know.
Thanks in advance
Regards,
Krishna A S Vwhy r u using two BDC
why dont u use only one and update Part I and Part II at a time
regards,
snb -
Hi,
Can i write a BDC for Automatic good recipt in MIGO on the save of inbound delivery.
Regards.Hello,
It is hard to do BDC on Enjoy transactions based on Control Framework. For MIGO, you can use BAPI_GOODSMVT_CREATE.
Thanks,
Venu -
Dear Gurus,
I want to create a BDC for GR-INBOUND DELIVERY.Is there any process that we have to upload two text files one at header level & one at item level.Pls suggest if there is any other method.
Regards,
Prasad.1)Create a recording of inbound delivery creation if u want to create in mass.
2) Make a note of all the filds recorded and make a excel sheet then convert it in notepad.
3) Upload it by LSMW. -
LSMW/BDC for service PO creation
Dear all,
Can anybody pl suggest how to create an LSMW or BDC for service PO creation with multiple
line items and under each line item there will be multiple service line items also.
Thx
Amitavahi,
You could do LSMW without the help of a technical consultant.
In LSMW you could create a PO by BDc or through BAPI.
Make use of the BAPI to create.
BAPI_PO_CREATE1. ( Nothing but a Se37 Function module).
the parmeters required can be checked in funcition module documentaion in the bapi.
Hope this helps.
harish -
Hi Gurus.
I want to create lsmw for SCC1.
BUT WHEN I AM CREATING THAT.
I CAN SEE MESSG. SAYING THAT "No default name could be found for field 'COMFILE'." and "No default name could be found for field 'INCL'."
these fields containing stracture.
but COMFILE having table that is E070-TRKORR.
now how to map in LSMW E070-TRKORR with COMFILE.
your answer will be appriciable.
Regards
SMHi SSMS,
when using Direct input method , u have to choose correct structure and exact fields where the data is exactly populating , if the field is not there which ur looking for , there is alternative field name where the field value is populating,
just check out that and mapp properly,
if u r facing difficulty , just go through with Recording method.
Thanks -
Hello Friends,
I have created LSMW (recording) for Migo Transaction .
After running the LSMW it is not storing data for fields BED,ECS and
SECESS in Excise ItemTab in Migo.
While the data for BED ,ECS AND SECESS Is properly read during read
data tab in lsmw.
But Manually doing Migo Transaction it stores the values for above
field.
Regards
Vijay Kumar SinghDear friend
Do you know any standard bdc for migo
Regards
VIjay kumar singh -
House number for LSMW /BDC
HI Experts,
When am doing the LSMW/BDC for Customer master House number field in general data.
the" house number " filed is not appearing since Street filed only apearing.
Is there any method to appear house no. filed .
I want to update house no filed for multiple customers.
Regards
VenkatHi
I will suggest to use the LSMw with Standard Batch/Direct input method with following details
Object 0050 Customer master
Method 0000
Program Name RFBIDE00
Program Type B Batch Input
after that you can select the field HOUSE_NO in the structure BIADDR2 - BI Structure for Consumers and maintain the same in the sorce fields
REgards
Damu -
tell me the useful tables for doing bdc for migo.urgent
See this tabels:
EKBE
EKBZ
where BWTYP = 'F'.
Regards,
Naimesh Patel -
BDC Calling MIGO transaction with different actions
Hi everyone,
i am doing a BDC for MIGO t-code....to create Good Receipt w.r.t Purchase Order.....
While executing the Pgm....if some other user has opened the MIGO t-code in DISPLAY mode then that pgm is not able to call the MIGO t-code...to create Good Receipt w.r.t Purchase Order.....
As this bdc pgm is witten to create the good receipt i.e. why it is not allowing to create the receipt as already someone else has opened it in DISPLAY mode....
The following code is to create Good Receipt w.r.t Purchase Order.....
perform bdc_field using 'GODYNPRO-ACTION'
'A01'. -
Good receipt
perform bdc_field using 'GODYNPRO-REFDOC'
'R01'.-----Purchase order
PLease if somebody can help me out with this code...or can send me any program related to this pgm.
With Regards,
Seevangi MishraTry using the bapi BAPI_GOODSMVT_CREATE.
Here is part of the code:
method create_goodsreceipt.
data: ls_header type bapi2017_gm_head_01.
data: lv_code type bapi2017_gm_code.
data: lv_document type bapi2017_gm_head_ret-mat_doc.
data: lv_year type bapi2017_gm_head_ret-doc_year.
field-symbols: <fsi> type bapi2017_gm_item_create.
data: lt_items type bapi2017_gm_item_create_t.
data: lt_ret type table of bapiret2.
data: ls_ret type bapiret2.
data: lv_error type xfeld.
data: ls_headout type bapi2017_gm_head_ret.
lt_items[] = items[].
* header position
ls_header-pstng_date = sy-datum.
ls_header-doc_date = sy-datum.
ls_header-ref_doc_no = 'ref do no'.
ls_header-pr_uname = sy-uname.
ls_header-header_txt = 'header test'.
* code invullen
move '01' to lv_code.
* aanpassen items table
loop at lt_items assigning <fsi>.
<fsi>-move_type = '101'.
<fsi>-mvt_ind = 'B'.
<fsi>-po_number = me->ebeln.
<fsi>-plant = me->bukrs.
endloop.
* bapi oproepen
call function 'BAPI_GOODSMVT_CREATE'
exporting
goodsmvt_header = ls_header
goodsmvt_code = lv_code
testrun = testrun
importing
goodsmvt_headret = ls_headout
materialdocument = lv_document
matdocumentyear = lv_year
tables
goodsmvt_item = lt_items
return = lt_ret.
* commit
if testrun = space .
lv_error = zcl_bapi=>check_for_errors( lt_ret ).
if lv_error is initial.
ls_ret-type = 'S'.
ls_ret-id = 'CREATED'.
ls_ret-message = ls_headout.
ls_ret-message_v1 = ls_headout-mat_doc.
append ls_ret to lt_ret.
call function 'BAPI_TRANSACTION_COMMIT'.
endif.
endif.
returntable[] = lt_ret[].
endmethod.
Hope it helps you,
Bert -
BDC or LSMW program for AS91 transaction
HI gurus,
i need a BDC or lsmw program for tran:AS91 ie.create legacy data for two inter company data transfer.can anyone please help me bkz it's very urgent for me...
i promise that if i get the ans i reward u.Hi,
Use Function Module:MAINTENANCE_PLAN_POST -
How to upload data for me01 using LSMW BDC METHOD
*hi export please tell me the complete procedure for uploading data in me01 using LSMW BDC METHOD*
Moderator message: please search for available information/documentation.
Edited by: Thomas Zloch on May 8, 2011 10:06 PMHi,
To be honest I don't understand your question. When You execute LSMW and create project, then all steps are shown in a very clear way with good description. With which one you have problems?
Best regards
Marcin Cholewczuk
Maybe you are looking for
-
How to connect your hdmi tv to the Thunderbolt display?
Hello, I've just got my Thunderbotl display which is really nice, but i have question and i hope this would be possible. How to connect an external display, in my case the HDMI tv to the thunderbolt display? The connection would looks something like
-
Issues with wi-fi on latest update
ever since i updated my ipad 2 to the newest 6.0.1 version it will not connect manually to my house wifi. i have rebooted, removed router and then added it back on. i have tried every fix and it doesnt work.help please
-
3g problems with Iphone 4.
Guys,This has been frustrating me so bad lately I'm thinking about taking back My IP4 and getting the Samsung Captivate.When I go inside my house my 3g connection becomes terrible,One page might open every 5 minutes.It's very bad and I don't live in
-
Poor Image Quality Transfered To iPhone
Hey guys, I'm pretty new to aperture after switching from iPhoto and have run into the following problem. I have iTunes set up to sync certain projects in my library over to my iPhone. The problem is the image quality being transferred is rather low
-
I had to get a new computer when I downloaded itunes and logged in it isn't showing downloads from my other computer. How do I get them back?