Tables for migo
tell me the useful tables for doing bdc for migo.urgent
See this tabels:
EKBE
EKBZ
where BWTYP = 'F'.
Regards,
Naimesh Patel
Similar Messages
-
BADI for MIGO update - Data not getting saved in table sometimes
Hi,
This is regarding automatic update of material document number to our Z Table for Gate entry in MM.
Steps for Generating GR throu2019 MIGO:-
1) the user has to key in the gate entry number and plant,
2) then after giving i/p values the user has to click the save button,
3) MIGO number is generated by the system which is updated in gate entry header table.
For updating the MIGO number BADI is used . But some time the system is not updating the GR number in gate entry header table.
Can we use COMMIT WORK statement in BADI? Hope its not advisable to use it.
What else can we do if data is not getting stored in table while updating throu2019 BADI?
Inside the Method : IF_EX_MB_MIGO_BADI~POST_DOCUMENT the below code is written,
Instead Of Updating The Gate Entry Item Table Now
Update The Gate Entry Header Table. Update The
Value Of The Field MBLNR With Current Document Number
Generated Updating the header table ZMM_GATE_ENTRY
SELECT SINGLE *
FROM ZMM_GATE_ENTRY
INTO WA_ZMM_GATE_ENTRY
WHERE GATEENTRYNO EQ GS_EXDATA_HEADER-GATEENTRYNO
AND WERKS EQ GS_EXDATA_HEADER-WERKS
AND GYEAR EQ GS_EXDATA_HEADER-ENTRY_DATE+0(4).
Check To Ensure That Once A Gate Entry Number
Is Associated With A GR It Cannot Be Reused
IF WA_ZMM_GATE_ENTRY-GR_NUMBER IS INITIAL.
WA_ZMM_GATE_ENTRY-REFERENCE = GS_EXDATA_HEADER-REFERENCE.
WA_ZMM_GATE_ENTRY-REFWERKS = GS_EXDATA_HEADER-WERKS.
WA_ZMM_GATE_ENTRY-GR_NUMBER = IS_MKPF-MBLNR.
WA_ZMM_GATE_ENTRY-GR_YEAR = IS_MKPF-MJAHR.
MODIFY ZMM_GATE_ENTRY FROM WA_ZMM_GATE_ENTRY .u201Dupdating the workarea
u201CThe above modify stmt updates data sometimes and does not updates the data sometimes
ELSE.
MESSAGE E901(ZMM) WITH GS_EXDATA_HEADER-GATEENTRYNO WA_ZMM_GATE_ENTRY-GR_NUMBER.
ENDIF.
Plz suggest some soln?
Regards,
P.S.ChitraHi,
This is regarding automatic update of material document number to our Z Table for Gate entry in MM.
Steps for Generating GR throu2019 MIGO:-
1) the user has to key in the gate entry number and plant,
2) then after giving i/p values the user has to click the save button,
3) MIGO number is generated by the system which is updated in gate entry header table.
For updating the MIGO number BADI is used . But some time the system is not updating the GR number in gate entry header table.
Can we use COMMIT WORK statement in BADI? Hope its not advisable to use it.
What else can we do if data is not getting stored in table while updating throu2019 BADI?
Inside the Method : IF_EX_MB_MIGO_BADI~POST_DOCUMENT the below code is written,
MODIFY ZMM_GATE_ENTRY FROM WA_ZMM_GATE_ENTRY .u201Dupdating the workarea
u201CThe above modify stmt in code updates data sometimes and does not updates the data sometimes
Moderator message: duplicate post locked.
Edited by: Thomas Zloch on Aug 10, 2010 11:33 AM -
Hi can any one tell me which tables are used in MIGO and if possible field names aslo .
Tables used in MIGO
CHVW Table CHVW for Batch Where-Used List
CHVW_IDX Batch Where-Used Index Table for Selection
IKPF Header: Physical Inventory Document
ISEG Physical Inventory Document Items
MARI Short document: material movement
MIGO_BADI_EXAMP2 BADI in MIGO: Example Table (Header)
MIGO_BADI_EXAMPL BADI in MIGO: Example Table
MIGO_BADI_HOLD MIGO BADI: Table for Held External Data
MIGO_CUST_ACTION MIGO: Control of Listbox Transaction
MIGO_CUST_FIELDS MIGO: Field Selection per Movement Type
MIGO_CUST_REFDOC MIGO: Control of Listbox Reference Documen
MIGO_CUST_TCODE MIGO: Transactions
MIGO_INIT Control Table for Operation in Transaction
MIGO_T156 Movement Types - Reference MIGO
MKPF Header: Material Document
MKPF_ARIDX Index table for single doc. access to arch
MMIM_PRED MM-IM Temporary Data
MMIM_PREDOC_ORG Parked Material Documents, Organizational
MMIM_REP_PRINT Print Settings, Reporting MM-IM
MMINKON Worklist for Inconsistent Materials
MMINKON_UP Corrections due to Technical Problems with
MSEG Document Segment: Material
MWCURM Customizing: MM Configuration
MWMKPF Header Table for the Interface
MWSTOR Reversal Transactions
MWXMSEG ZMSEG: Interface for Posting of Value
MWXVM07M Fields: Update Control of Module Pool SAPM
MWYMBUZ Line Assignment
MWZDM07M1 ZDM07M1
MWZDM07M2 ZDM07M2
MWZMBUZ ZMBUZ
MWZMSEG ZMSEG:Interface for Posting of Value
MWZVM07M Fields: Update Control of Module Pool SAPM
RESB Reservation/dependent requirements
RKPF Document Header: Reservation
RPGRI Texts for grouping of movement types
SBSE Stock Mngmt Levels for Inventory Sampling
SKPF Header Data: Inventory Sampling
SLGH Elements of Stock Population
SSCH Strata of Inventory Sampling
T003M Transaction/Event Types for SAPMM07M/SAPMM
T043I Tolerance Groups for Persons Processing In
T063 Screen Control: Inventory Management
T063C Call-Screen Control: Inventory Management
T063D Screen Control: View in Inventory Manageme
T063F Function Codes: Inventory Management
T063O OK Codes in Inventory Management
T063T Transactions Called Up From Inventory Mana
T064A Physical Inventory Stock Types
T064B Stock Types and Texts for Physical Invento
T064F Function Codes: Physical Inventory
T064S Stock Mngmt Levels for Inventory Sampling
T064T Physical Inventory: Texts
T134H Organiz. Unit: Business Area Determ. - MM
T134M Control of Qty/Value Update
T150 Physical Inventory Stock Types and Allocat
T150F Stock Types and Allocated Fields in Physic
T156 Movement Type
T156B Movement Types: Screen Selection
T156C Stock Types and Their Values
T156F Fields in Quantity String
T156H Help Texts for Movement Type (up to Rel. 2
T156HT Main Text for Movement Type
T156K Account Assignment Fields in Field Selecti
T156M Posting String: Quantity
T156N Next Movement Type
T156S Movement Type: Quantities/Value Posting (U
T156SC Mvt Type: Qty/Value Posting: Customer Tabl
T156SY Mvt Type: Qty/Value Update: System Table;
T156T Movement Type Text
T156V Availability Table
T156W Posting string values
T156X Trans./Event Key Modification
T157B Descr. of Qty Fields (Plant Stock Avail.,
T157D Reason for Movement
T157E Text Table: Reason for Movement
T157F Display Fields: Plant Availability
T157H Help Texts for Movement Types
T157N Fields in Stock Balance Display (Inventory
T157O Routine Selection for Plant Availability
T157P Display Rules
T157Q Inventory Mgmt.: Display Rules for Plant S
T157R Display Rule for Availability Block
T157T Description of Fields in Availability Bloc
T158 Transaction Control: Inventory Management
T158B Check Table: Movement Type for Transaction
T158G MMIM: Possible Codes for BAPI Goods Moveme
T158I Transaction Control: Physical Inventory
T158N Next Transaction Code in Inventory Managem
T158T Inv. Management: Text Table for Trans./Eve
T158V Inv. Mngmt - General: Transaction/Event Ty
T158W Long Text for Transaction/Event Type
T159A Test Data for Batch Input in Inventory Man
T159B Parameters for Batch Inputs in Inventory M
T159C Value table for counting cycles in cycle c
T159E IM Print Func.:Determ.No.of Copies f. Labe
T159F MMIM: Error Messages Resulting From Blocke
T159G Default Values for Inventory Sampling Prof
T159H Long Text for Inv. Sampling Profile
T159I Test Data for Batch Input in Inventory Man
T159L Default values for inventory management an
T159M Inv. Managmt Print Function: Active Form V
T159N Invent. Mgmt Print Function: Active Form V
T159O Inv. Mngmt Print Function: Maintain Text N
T159P Parameters for Printing GR/GI Slips
T159Q Inventory Management Print Function: Value
T159R IM Document Reorganization - Life of Docum
T159S Inventory Mgmt Print Function: Printer Com
T159T Invntry Mgmt. Printing: Text Table for Tab
T159X Inventory Management: XAB numer range dete
T159Z Inventory Management: XAB number range
TNAD9 Output Determination: Printer per SLoc. an
TXSTA MM Inventory Mngmt: Work Table for Phys. I
Pl reward if useful
Narendra -
In Which Table I Will get Reference Document for MIGO Transaction
Hai Experts
In Which Table I Will get Reference Document for MIGO Transaction
Regards
JagadishHi,
The 2 main tables for this MIGO Transaction are ,
MKPF - Header table
MSEG - Item table
Reference Document is XBLNR.
Regards,
Raj. -
Enhancement for MIGO when SAVE with any of these tables afru,aufk,jest,tj02
Enhancements/BADI's for MIGO Transaction When SAVE.
Tables: afru,aufk,jest,tj02t,afpo,
eban,qave,qals.
can anyone pls suggest Enhancements/Exits/BADI's
for MIGO transaction where i can use any of the
above tables .
i found mb_migo_badi, i dont think i can use this.
If any one know any user exits to do it .
Regards
Ashok.Hi Madhu,
user exits for stopping PO creation without production order confirmation.
Regards,
Ashok. -
How can i set a layout for MIGO screen
Hello all,
How can i set a layout for MIGO screen. & make that layout default. Like i want to drag Requistioner column next to quantity in MIgo screen. temporarily I can drag but is there a way to save as layout & save it.Hi
First you arrange however you want and then go to table settings which is there in the right corner of the item details and create a variant and save.
Find a button with blue yellow and white at the top end above the vertical drag bar when put the cursor it will show you as Configuration.
After creating the variant tick the check box use as standard setting below the variant
Hope it helps
Edited by: Girish Adaviswamy on Mar 3, 2010 1:27 PM -
i have created a bapi to upload data for MIGO transaction.. (GOODS RECEIPT-->PURCHASE ORDER)
i am getting the error " stock posting is not possible for this material "'.
when i create directly, it is posted.. while uploading through the program it shows the above error.
please suggest if anyone knows....
Thanks in advance,
Dhivya N.*& Report ZR_MIGO_UPLOAD
*& package name : zabap
*& transport request number : MIDK901443
*& program to upload goods movement
REPORT ZR_MIGO_UPLOAD.
***DATA DECLARATION***
type-POOLs: icon.
TYPES: BEGIN OF TY_GR_PO,
EBELN(10) TYPE c , "'PO NUMBEr
EBELP(10) TYPE c, "PO ITEM NUMBER
* LGOBE TYPE LGOBE, "STORAGE LOCATION DESCRIPTION
LGORT(10) TYPE c, "STORAGE LOCATION
XFELD TYPE c, "ITEM OK
GERNR(10) TYPE c, "SERIALNUMBER
END OF TY_GR_PO.
DATA: TA_GR_PO TYPE TABLE OF TY_GR_PO, "TABLE FOR GOODS RECEIPT PURCHASE ORDER
WA_GR_PO TYPE TY_GR_PO.
DATA: BLDAT TYPE BLDAT, "DOCUMENT DATE
BUDAT TYPE BUDAT, "POSTING DATE
WEVER TYPE WEVER. "VERSION FOR PRINTING GR SLIP
***BAPI DECLARATION***
DATA: BEGIN OF GM_HEAD OCCURS 0. "Material Document Header Data
INCLUDE STRUCTURE BAPI2017_GM_HEAD_01.
DATA: END OF GM_HEAD.
DATA: BEGIN OF GM_CODE OCCURS 0.
INCLUDE STRUCTURE BAPI2017_GM_CODE. "Assign Code to Transaction for Goods Movement
DATA: END OF GM_CODE.
DATA: BEGIN OF GM_RET OCCURS 0.
INCLUDE STRUCTURE BAPI2017_GM_HEAD_RET. "Material Document Number/Material Document Year
DATA: END OF GM_RET.
DATA: BEGIN OF GM_ITEM OCCURS 0.
INCLUDE STRUCTURE BAPI2017_GM_ITEM_CREATE. "Material Document Items
DATA: END OF GM_ITEM.
DATA: BEGIN OF GM_SER OCCURS 0.
INCLUDE STRUCTURE BAPI2017_GM_SERIALNUMBER. "Serial Number
DATA: END OF GM_SER.
data: BEGIN OF ta_bapireturn OCCURS 0.
INCLUDE STRUCTURE BAPIRET2.
data: END OF ta_bapireturn.
***declaration of excel file handling table***
FIELD-SYMBOLS: <fs> type any. "field symbol for alsm_excel
DATA: TA_EXCEL TYPE TABLE OF ALSMEX_TABLINE, "table to contain excel sheet values
WA_EXCEL TYPE ALSMEX_TABLINE.
***declaration of other parameters***
data: V_brow type i VALUE 2, "BEGIN OF ROW
V_bcol type i value 1, "BEGIN OF COL
V_erow type i value 65536, "END OF ROW
V_ecol type i value 256. "END OF COLUMN
DATA: V_sear type string,
V_INDEX TYPE i,
V_tabix type sy-tabix, "current line.
v_lines type i. "total number of records
DATA: DATE TYPE DATS.
***SELECTION SCREEN***
***SELECTION SCREEN DESIGN***
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP 3.
PARAMETERS: zCODE(2) TYPE C MATCHCODE OBJECT H_T158G,
zrefdoc type REFDOC,
version type WEVER.
SELECTION-SCREEN skip 5.
PARAMETERS: p_file type ibipparms-path.
SELECTION-SCREEN SKIP 3.
SELECTION-SCREEN END OF BLOCK b1.
***SELECTION SCREEN VALUE REQUEST***
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
CALL FUNCTION 'F4_FILENAME' "f4 help for file name
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = 'P_FILE'
IMPORTING
FILE_NAME = P_FILE.
***SELECTION SCREEN EVENT***
AT SELECTION-SCREEN. "validation
if p_file <> ''.
V_sear = p_file.
SEARCH V_sear for '.xls'.
if sy-subrc <> 0.
message 'please provide excel file. it is not valid' type 'E'.
ENDIF.
ENDIF.
INITIALIZATION.
* DATE = '17.04.14'.
GM_HEAD-PSTNG_DATE = SY-DATUM.
GM_HEAD-DOC_DATE = SY-DATUM.
gm_head-pr_uname = sy-uname.
***START OF SELECTION***
START-OF-SELECTION.
gm_head-REF_DOC_NO = zrefdoc.
gm_head-VER_GR_GI_SLIP = version.
GM_CODE-GM_CODE = zCODE.
PERFORM EXCEL_UPLOAD.
PERFORM EXCEL_CONVERSION.
PERFORM NO_RECORDS.
END-OF-SELECTION.
PERFORM BAPI_ASSIGNMENT.
PERFORM BAPI_FM.
*& Form EXCEL_UPLOAD
* text
* --> p1 text
* <-- p2 text
FORM EXCEL_UPLOAD .
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = P_FILE
I_BEGIN_COL = V_BCOL
I_BEGIN_ROW = V_BROW
I_END_COL = V_ECOL
I_END_ROW = V_EROW
TABLES
INTERN = TA_EXCEL
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3.
ENDFORM. " EXCEL_UPLOAD
*& Form EXCEL_CONVERSION
* text
* --> p1 text
* <-- p2 text
FORM EXCEL_CONVERSION .
if ta_excel is NOT INITIAL.
sort ta_excel by row col.
clear wa_excel.
clear wa_GR_PO.
LOOP AT ta_excel INTO wa_excel.
move wa_excel-col to v_index.
ASSIGN COMPONENT v_index OF STRUCTURE wa_GR_PO to <fs>.
if sy-subrc = 0.
move wa_excel-value to <fs>.
ENDIF.
at END OF row.
append wa_GR_PO to ta_GR_PO.
clear wa_GR_PO.
ENDAT.
ENDLOOP.
else.
MESSAGE 'no data for conversion' type 'I'.
ENDIF.
ENDFORM. " EXCEL_CONVERSION
*& Form NO_RECORDS
* text
* --> p1 text
* <-- p2 text
FORM NO_RECORDS .
DESCRIBE TABLE ta_GR_PO LINES v_lines.
if v_lines = 0.
MESSAGE 'NO RECORDS TO UPLOAD' TYPE 'E'.
ENDIF.
ENDFORM. " NO_RECORDS
*& Form BAPI_ASSIGNMENT
* text
* --> p1 text
* <-- p2 text
FORM BAPI_ASSIGNMENT .
IF TA_GR_PO IS NOT INITIAL.
LOOP AT TA_GR_PO INTO WA_GR_PO.
gm_item-PO_NUMBER = wa_gr_po-ebeln.
GM_ITEM-STGE_LOC = WA_GR_PO-LGORT.
GM_ITEM-PO_ITEM = WA_GR_PO-EBELP.
GM_ITEM-NO_MORE_GR = 'X'."WA_GR_PO-XFELD'.
* GM_SER-SERIALNO = WA_GR_PO-GERNR.
gm_item-NO_MORE_GR = 1.
gm_item-ENTRY_QNT = 2.
gm_item-MOVE_TYPE = 101.
* gm_item-MVT_IND = 'B'.
gm_item-plant = 'P001'.
gm_item-move_stloc = 'FG01'.
* GM_ITEM-SPEC_STOCK = 'K'.
APPEND GM_ITEM.
APPEND GM_SER.
ENDLOOP.
ELSE.
MESSAGE 'DATA IS NOT UPLOADED' TYPE 'I'.
ENDIF.
ENDFORM. " BAPI_ASSIGNMENT
*& Form BAPI_FM
* text
* --> p1 text
* <-- p2 text
FORM BAPI_FM .
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
GOODSMVT_HEADER = gm_head
GOODSMVT_CODE = gm_code
* TESTRUN = ' '
* GOODSMVT_REF_EWM =
IMPORTING
GOODSMVT_HEADRET = gm_ret
* MATERIALDOCUMENT =
* MATDOCUMENTYEAR =
TABLES
GOODSMVT_ITEM = gm_item
GOODSMVT_SERIALNUMBER = gm_ser
RETURN = ta_bapireturn
* GOODSMVT_SERV_PART_DATA =
* EXTENSIONIN =
if ta_bapireturn-type = 'S'.
write:/ icon_green_light as icon,
'success: Material document',gm_ret-mat_doc, 'is created for the GOODS RECEIPT- po number : ', wa_gr_po-ebeln,
/ 'reason:' , ta_bapireturn-message.
ELSEIF ta_bapireturn-type = 'E'.
write:/ icon_red_light as icon,
'error: Material document',gm_ret-mat_doc , 'is not created for the GOOD RECEIPT- po number : ', wa_gr_po-ebeln,
/ 'reason:' , ta_bapireturn-message.
ENDIF.
ENDFORM. " BAPI_FM -
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? -
How to populate cusotom fields using BAPI_GOODSMVT_CREATE for MIGO
Hi,
I was to update custom field using BAPI_GOODSMVT_CREATE for MIGO and store it is MSEG table.
Please tell me how to proceed.
Moderator message: last warning, if you continue to post the same thread again, I will submit your user ID for deletion. See my comments in your previous posts.
Edited by: Thomas Zloch on Jul 14, 2011 4:38 PMHi ANID,
Thanks for the reply.
I have checked in the documention of the bapi and no communication structure regarding to the bapi is there so i am not able to figure out where to add the custom field so that it can be added in the MKPF table.
Regads
Dipak -
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 -
Enhancement for Automatic GI for MIGO transaction
Hey Folks ,
My requirement is as :
I wanted to do automatic GI of the goods once their GR is done and dat data should also be updated to sap tables .Now a days we are using MIGO transaction for GI and GR both ,I have found a BADI for MIGO also but i am unable how to procede since GR and GI are in single trancation code .
We are also not using PP module so backflushing wont work here .
Automatic GI should trigger after saving the GR entries .
Regards
Edited by: swapnil kamble on Jan 13, 2010 5:53 PM
Moderator message - Cross post locked
Edited by: Rob Burbank on Jan 13, 2010 12:04 PMHi Renjith,
You can check the following link, Hope it helps you to some extent:
Re: Implement unique serial number within a client
And you can also try user exit EXIT_SAPLIPW1_001 for Automatic serial number assignment. -
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. -
Hi to all experts,
I need to assign F4 help to a headertext field for MIGO tcode . I have searched all the exits but couldnt find field exit for it. What are the different options fulfilling this requirement.Please help me outHi,
The following are the enhancement/Business Add ins, Please use the appropriate exit for your requirement
Enhancement/ Business Add-in Description
Enhancement
MB_CF001 Customer Function Exit in the Case of Updating a Mat. Doc.
MBCF0011 Read from RESB and RKPF for print list in MB26
MBCF0010 Customer exit: Create reservation BAPI_RESERVATION_CREATE1
MBCF0009 Filling the storage location field
MBCF0007 Customer function exit: Updating a reservation
MBCF0006 Customer function for WBS element
MBCF0005 Material document item for goods receipt/issue slip
MBCF0002 Customer function exit: Segment text in material doc. item
Business Add-in
MB_DOCUMENT_UPDATE BADI when updating material document: MSEG and MKPF
MB_DOC_BADI_INTERNAL BAdIs During Creation of a Material Document (SAP Internal)
MB_ME_CSGMT_BADI_SAP BAdI: Consignment Processing - Stock Transfer
MB_MIGO_BADI BAdI in MIGO for External Detail Subscreens
MB_MIGO_ITEM_BADI BAdI in MIGO for Changing Item Data
MB_PHYSINV_INTERNAL Connection: Core Inventory and Retail AddOn
MB_QUAN_CHECK_BADI BAdI: Item Data at Time of Quantity Check
MB_RESERVATION_BADI MB21/MB22: Check and Complete Dialog Data
MB_RESERVATION_SCR Screen BAdI for Retrofit DFPS
MB_RESERVATION_UPCHD BAdI for Creation and Changing of Manual Reservations
MB_RES_BAPI_CHANGE BAdI: Execution of Changes to Reservation Fields
MB_RES_BAPI_CREATE1 BAdI: Adoption of Customer's Own Fields as Reserv. Fields
MB_RES_BAPI_DETAIL1 BAdI: Display of Customer's Own Fields in Reservations
MB_STOR_LOC_BADI_GTS BADI to Check and Change Storage Location (GTS Fct. Only)
MB_DOCUMENT_BADI_SAP BADI for Creation and Changing of a Material Document
ARC_MM_EBAN_CHECK BAdI: Enhancement of Archivability Check (MM_EBAN)
ARC_MM_EBAN_PRECHECK BAdI: Enhancement of Archivability Check (MM_EBAN)
ARC_MM_EBAN_WRITE BAdI: Enhancement of Scope of Archiving (MM_EBAN)
ARC_MM_EINA_CHECK BAdI: Enhancement of Archivability Check (MM_EINA)
ARC_MM_EINA_WRITE BAdI: Enhancement of Scope of Archiving (MM_EINA)
ARC_MM_INVBEL_CHECK BAdI: Enhancement of Archivability Check (MM_INVBEL)
ARC_MM_INVBEL_WRITE BAdI: Enhancement of Scope of Archiving (MM_INVBEL)
ARC_MM_MATBEL_CHECK Prüfung ADD-ON-spezifischer Kriterien für MM_MATBEL
ARC_MM_MATBEL_WRITE Check Add-On-Specific Data for MM_MATBEL
MB_CHECK_LINE_BADI BAdI: Check Line Before Copying to the Blocking Tables
MB_CIN_LMBMBU04 posting of gr
MB_CIN_MM07MFB7 BAdI for India Version exit in include MM07MFB7
MB_CIN_MM07MFB7_QTY Proposal of quantity from Excise invoice in GR
MB_DOCUMENT_BADI BAdIs During Creation of a Material Document -
Hello,
I need to find a BADI or USER-EXIT for MIGO and MB01 at the time of posting, to store in table BSEG fields ZBD1T LIFNR ZTERM the table EKKO.
I found User-exits several but none contains the BSEG as output instead contains MSEG and the MKPF which I serve.
Someone can help me?
Thanks
DiegoTry this BTE 00001120
link:
Fill in BSEG-ZUONR with PO BEDNR field
Thanks,
AMS -
FM for migo against outbound delivery
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
I am using this FM for migo against outbound delivery can i get waht parameters i have to pass
for this FM for outbound deliverygmhead-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
itab-move_type = '101'.
itab-mvt_ind = 'B'.
itab-plant = 'FD11'.
itab-material = '0000900152'.
itab-entry_qnt = '1.000'.
itab-move_stloc = 'FG'.
itab-stge_loc = 'FG' .
itab-po_number = '5500004086'.
itab-DELIV_NUMB = '0171000465'.
itab-DELIV_ITEM = '10'.
itab-PO_ITEM = '10'.
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
Error in function
Material document data and PO data do not match (Material)
i am getting this error
help me
Maybe you are looking for
-
Error occurred while converting the file...
So, it seems like every CD that I tried importing over the last couple of days at some point caused the software to stop and go: Error occurred while converting the file "[Track name here]". An unknown error occurred (-50). Has a solution been found
-
FSL 0001 error in SAP NetWeaver '04 SR01 installation
Hi!!! I have a problem while I'm installing SAP NetWeaver '04 SR01 installation Abap system, central installation. I hace Oracle 9 and Windows 2003 Server. I'm installing locally. I'm installing from the hard disk (D:) and the drive E is the DVD Driv
-
Please find the Resubmission Feature in B2B available in. http://rameshnittursblog.blogspot.com/2007/12/resubmission-feature-in-b2b.html Rgds,Ramesh
-
ODP bug with generated SQL script when using DateTime
With EF5, I'm getting some really weird SQL scripts when dealing with DateTime. THe follow script works fine. var a = db.MOTOR_POOL_RESERVATION .Where(o => o.DEPART_DT > new DateTime(2013, 1, 1)) .Select(o => o.RESERVATION_ID) .ToList(); SELECT "Exte
-
using Elements 11, can I get a plug in that supports both cameras, and still access my old raw 7.1 files