How to upload work orders using IW31
HI,
I am trying to upload PM Work orders using tcode IW31 but unable to do so. I have tried LSMW and now I am trying for BDC but still can't upload. Can anyone let me know what procedure do I need to perform for uploading DATA through IW31.
Its really very important.
Thanks.
Regards,
Yahya
Hey
You can upload the data for creating a work orders through IW31/IW34.
IW31 is for Work Orders with out a Notification(In general) and IW34 is for Orders with Notification(Must)
So if you want to load Orders With Notification Then first we need to create a Notification in IW24 and then Order in IW34 with the Notification created at that point.
If you want to create Order with out Notification then Goto IW31 and then create it through BDC method.
There might be a scenario in which you can create a Order w/o Notification and with Notfication sometimes in IW31 Only.
Then at that point you need to goto IW31 and create a Order First and then Display the Order in IW33 and Click on Change from the top of the menu. It wil allow you to create a Notification from there(IW31) beside the Euipment field I remember.
You can try it with BDC. if you still have a problem in doing so. i will send the code.
Regards,
Bhargav.
Similar Messages
-
Create a work order using the BAPI for IW31
Hi,
I want to create a work order using the BAPI for IW31 tr. can any one help me with the program description.
Full points will be awarded for the useful answers.
Thanks and regards,
Sunilhi,
first use fm "bapi_po_create".
then use fm "BAPI_ACC_GL_POSTING_POST"
The demo environment was made with real business scenario in mind, but following subjects need to be addressed in a live implementation:
No exceptions and error handling is implemented, except the order rejection (e.g. partly delivery);
In Navision both XML Ports and the XML DOM has been used to integrate with SAP XI, because XML ports has some drawbacks regarding to Namespaces in XML Documents (mandatory in SAP XI);
A minimum of SAP and Navision customization is required to implement this solution. (e.g. user exit in SAP, Navision XML DOM). -
How to Attach permit automatically to an work order using abap
how to Attach permit automatically to an work order using abap
Moderator message : Not enough re-search before posting, show the work you have already done, thread locked.
Edited by: Vinod Kumar on Jan 30, 2012 2:16 PMAt least make sure that you have a default method 'browse' in your class. I mean that make a method for "displaying" or "browsing" or whatever you want to happen when you click the object, and make it default. OR actually if I remember correctly there is a default method existing already, but put your code to there.
Also try this:
-Create a container element of type 'sales order' into your task
-Bind the sales order object from workflow to the the task
Regards,
Karri -
How to create purchase order using VA01 for BAPI?
how to create purchase order using VA01 for BAPI?
Hi Arun,
Please check this link
Example Program for BAPI_PO_CREATE1
Re: BAPI_PO_CREATE1
Questions in BAPI_PO_CREATE1
Problem with BAPI_PO_CREATE1
*& Report BAPI_PO_CREATE *
REPORT bapi_po_create.
Input File Declaration
TYPES: BEGIN OF ty_input_file,
column1 TYPE char50,
column2 TYPE char50,
column3 TYPE char50,
column4 TYPE char50,
column5 TYPE char50,
column6 TYPE char50,
column7 TYPE char50,
column8 TYPE char50,
column9 TYPE char50,
column10 TYPE char50,
column11 TYPE char50,
column12 TYPE char50,
column13 TYPE char50,
column14 TYPE char50,
column15 TYPE char50,
column16 TYPE char50,
column17 TYPE char50,
column18 TYPE char50,
END OF ty_input_file.
DATA: i_input_file TYPE STANDARD TABLE OF ty_input_file,
wa_input_file TYPE ty_input_file.
CONSTANTS: c_path TYPE char20 VALUE 'C:\',
c_mask TYPE char9 VALUE ',.,..',
c_mode TYPE char1 VALUE 'O',
c_filetype TYPE char10 VALUE 'ASC',
c_x TYPE char01 VALUE 'X'.
PARAMETERS : p_fname LIKE rlgrap-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
Browse Presentation Server
PERFORM f4_presentation_file.
START-OF-SELECTION..
Read presentation server file
PERFORM f1003_upload_file.
IF NOT i_input_file[] IS INITIAL.
PERFORM split_data.
ENDIF.
*& Form f4_presentation_file
*& F4 Help for presentation server
FORM f4_presentation_file .
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_path = c_path
mask = c_mask
mode = c_mode
title = text-001
IMPORTING
filename = p_fname
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " f4_presentation_file
*& Form f1003_upload_file
*& Upload File
FORM f1003_upload_file .
DATA: lcl_filename TYPE string.
lcl_filename = p_fname.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = lcl_filename
filetype = c_filetype
has_field_separator = c_x
TABLES
data_tab = i_input_file
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
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.
ENDFORM. " f1003_upload_file
*& Form split_data
Collect data for creating Purchase Order
FORM split_data .
DATA: i_poitem TYPE STANDARD TABLE OF bapimepoitem,
i_poitemx TYPE STANDARD TABLE OF bapimepoitemx,
i_poitem_sch TYPE STANDARD TABLE OF bapimeposchedule,
i_poitem_schx TYPE STANDARD TABLE OF bapimeposchedulx,
i_acct_*** TYPE STANDARD TABLE OF bapimepoaccount,
i_acct_assx TYPE STANDARD TABLE OF bapimepoaccountx,
i_services TYPE STANDARD TABLE OF bapiesllc ,
i_srvacc TYPE STANDARD TABLE OF bapiesklc,
i_return TYPE STANDARD TABLE OF bapiret2,
wa_header TYPE bapimepoheader,
wa_headerx TYPE bapimepoheaderx,
wa_poitem TYPE bapimepoitem,
wa_poitemx TYPE bapimepoitemx,
wa_poitem_sch TYPE bapimeposchedule,
wa_poitem_schx TYPE bapimeposchedulx,
wa_acct_*** TYPE bapimepoaccount,
wa_acct_assx TYPE bapimepoaccountx,
wa_services TYPE bapiesllc,
wa_srvacc TYPE bapiesklc,
wa_return TYPE bapiret2,
ws_po TYPE bapimepoheader-po_number.
break gbpra8.
wa_services-pckg_no = 10.
wa_services-line_no = 1.
wa_services-outl_no = '0'.
wa_services-outl_ind = c_x.
wa_services-subpckg_no = 20.
APPEND wa_services TO i_services.
wa_srvacc-pckg_no = 10.
wa_srvacc-line_no = 1.
wa_srvacc-serno_line = 01.
wa_srvacc-serial_no = 01.
wa_srvacc-percentage = 100.
APPEND wa_srvacc TO i_srvacc.
LOOP AT i_input_file INTO wa_input_file.
IF wa_input_file-column2 EQ 'HD'.
wa_header-doc_type = wa_input_file-column3.
wa_header-creat_date = sy-datum.
wa_header-created_by = sy-uname.
wa_header-vendor = wa_input_file-column4.
PERFORM conversion_output USING wa_header-vendor
CHANGING wa_header-vendor.
wa_header-comp_code = 'DE03'.
wa_header-purch_org = 'DE03'.
wa_header-pur_group = 'DE1'.
wa_header-vper_start = wa_input_file-column9.
wa_header-vper_end = wa_input_file-column10.
wa_headerx-comp_code = c_x.
wa_headerx-doc_type = c_x.
wa_headerx-creat_date = c_x.
wa_headerx-created_by = c_x.
wa_headerx-vendor = c_x.
wa_headerx-purch_org = c_x.
wa_headerx-pur_group = c_x.
wa_headerx-vper_start = c_x.
wa_headerx-vper_end = c_x.
ENDIF.
IF wa_input_file-column2 EQ 'IT'.
wa_poitem-po_item = wa_input_file-column3.
wa_poitem-short_text = wa_input_file-column6.
wa_poitem-plant = wa_input_file-column8.
wa_poitem-quantity = '1'.
wa_poitem-tax_code = 'V0'.
wa_poitem-item_cat = 'D'.
wa_poitem-acctasscat = 'K'.
wa_poitem-matl_group = wa_input_file-column7.
wa_poitem-pckg_no = '10'.
APPEND wa_poitem TO i_poitem .
wa_poitemx-po_item = wa_input_file-column3.
wa_poitemx-po_itemx = c_x.
wa_poitemx-short_text = c_x.
wa_poitemx-plant = c_x.
wa_poitemx-quantity = c_x.
wa_poitemx-tax_code = c_x.
wa_poitemx-item_cat = c_x.
wa_poitemx-acctasscat = c_x.
wa_poitemx-matl_group = c_x.
wa_poitemx-pckg_no = c_x.
APPEND wa_poitemx TO i_poitemx.
wa_poitem_sch-po_item = wa_input_file-column3.
wa_poitem_sch-delivery_date = sy-datum.
APPEND wa_poitem_sch TO i_poitem_sch.
wa_poitem_schx-po_item = wa_input_file-column3.
wa_poitem_schx-po_itemx = c_x.
wa_poitem_schx-delivery_date = c_x.
APPEND wa_poitem_schx TO i_poitem_schx.
wa_acct_***-po_item = 10.
wa_acct_***-serial_no = 01.
wa_acct_***-gl_account = '0006360100'.
wa_acct_***-co_area = '1000'.
wa_acct_***-costcenter = 'KC010000'.
APPEND wa_acct_*** TO i_acct_***.
wa_acct_***-po_item = 10.
wa_acct_***-serial_no = 02.
wa_acct_***-gl_account = '0006360100'.
wa_acct_***-co_area = '1000'.
wa_acct_***-costcenter = 'KC010000'.
APPEND wa_acct_*** TO i_acct_***.
wa_acct_assx-po_item = 10.
wa_acct_assx-serial_no = 01.
wa_acct_assx-po_itemx = c_x.
wa_acct_assx-serial_nox = c_x.
wa_acct_assx-gl_account = c_x.
wa_acct_assx-co_area = c_x.
wa_acct_assx-costcenter = c_x.
APPEND wa_acct_assx TO i_acct_assx.
wa_acct_assx-po_item = 10.
wa_acct_assx-serial_no = 02.
wa_acct_assx-po_itemx = c_x.
wa_acct_assx-serial_nox = c_x.
wa_acct_assx-gl_account = c_x.
wa_acct_assx-co_area = c_x.
wa_acct_assx-costcenter = c_x.
APPEND wa_acct_assx TO i_acct_assx.
wa_services-pckg_no = 20.
wa_services-line_no = 2.
wa_services-service = wa_input_file-column9.
wa_services-quantity = '100'.
wa_services-gr_price = '100'.
wa_services-userf1_txt = wa_input_file-column13.
APPEND wa_services TO i_services.
wa_srvacc-pckg_no = 20.
wa_srvacc-line_no = 1.
wa_srvacc-serno_line = 02.
wa_srvacc-serial_no = 02.
wa_srvacc-percentage = 100.
APPEND wa_srvacc TO i_srvacc.
ENDIF.
ENDLOOP.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = wa_header
poheaderx = wa_headerx
POADDRVENDOR =
TESTRUN =
MEMORY_UNCOMPLETE =
MEMORY_COMPLETE =
POEXPIMPHEADER =
POEXPIMPHEADERX =
VERSIONS =
NO_MESSAGING =
NO_MESSAGE_REQ =
NO_AUTHORITY =
NO_PRICE_FROM_PO =
IMPORTING
exppurchaseorder = ws_po
EXPHEADER =
EXPPOEXPIMPHEADER =
TABLES
return = i_return
poitem = i_poitem
poitemx = i_poitemx
POADDRDELIVERY =
poschedule = i_poitem_sch
poschedulex = i_poitem_schx
poaccount = i_acct_***
POACCOUNTPROFITSEGMENT =
poaccountx = i_acct_assx
POCONDHEADER =
POCONDHEADERX =
POCOND =
POCONDX =
POLIMITS =
POCONTRACTLIMITS =
poservices = i_services
posrvaccessvalues = i_srvacc
POSERVICESTEXT =
EXTENSIONIN =
EXTENSIONOUT =
POEXPIMPITEM =
POEXPIMPITEMX =
POTEXTHEADER =
POTEXTITEM =
ALLVERSIONS =
POPARTNER =
break gbpra8.
LOOP AT i_return INTO wa_return.
ENDLOOP.
ENDFORM. " split_data
*& Form conversion_output
Conversion exit input
FORM conversion_output USING p_ip
CHANGING p_op.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = p_ip
IMPORTING
output = p_op.
ENDFORM. " conversion_output
Best regards,
raam -
How to upload multiple files using wicket
Hai,
how to upload multiple files using wicket at a single browse.
any suggestion?
Thanks in advanceYou have to do this your self by either (as vinod said) using a different component (not present in adf) or implementing this:
1) allow the user to select multiple filenames (somehow)
2) zip them together
3) upload the zip
4) unpack the zip on the server
5) work with the files
Timo -
How to Upload a File using FileReference + PHP??
How to Upload a File using FileReference + PHP??
If you could help me with a two code examples the AS code and
the PHP code of a working example.
Thanks
Jorgehttp://www.flash-db.com/Tutorials/upload/upFiles.php?page=1
-
On Work Order using Object lists for equip u can manually create Notifi
On a maintenance Work Order using Object lists for equipment you can manually create a notification for each line item.
We want to automate this process to do this when we save the document.
Any ideau2019s on how to do this?
Does a user exit exist for this?Hi:
Check with Tcode: IBIP - Plant maintenace batch input utility tool.
Hope, it may help!
Thanks,
Murali. -
How to create Work Order in CMRO
Dear All,
We are new to using Oracle CMRO and because of unavailability of CMRO resources, we are facing quite a few problems while working on CMRO. Can anyone please help me out how can I create Work Order using CMRO.
If anyone can provide me with Oracle CMRO White Papers, I will be very thankful.
Regards,
Zulfiqar Ali MughalHi,
There are 3 ways to create work order in oracle cMRO.
1) Through Maintenance Requirement and associated to visit and push to production.
2) Non-routine.
3) Unassociated Task.
1. Create Work Order From Maintenance Requirement:- In order create work order first of all we need to define an MR in Engineering > Fleet Maintenance Program > Overview > Create. After creating the MR Header at least one route should be associated (Route can be created from Engineering > Route >Overview > Create and the status should be "complete"). Then MR effectivity (means which item or unit MR is applicable) need to be defined and in turn the interval threshold also need to define. Once the MR is completed from the Planning window associate the MR to a visit and push to Production. In case of Planned MRs run the Build Unit Effectivities and view the due date from the Planning> Unit Maintenance Plan screen and associate to a Visit in Planning and push the visit to production. In case of Unplanned MRs create visit, associate unplanned MR, push to production.Work Orders would have generated and visible in Execution >Production Planning > Work Orders.
2. Create Non-Routine:- Non- Routines can be created from Execution and Planning
a.Create Non-Routine work order from Execution:- Select the Routine work order and select Create Non-Routine work order from the pull down menu, furnish the details like severity, urgency, summary etc. and click on (B) Apply.
b.Non-Routine from Planning: Create NR from Planning >Unit Maintenance Plan> Non-Routines (B)Create and then associate to a visit and push to production.
3. Unassociated Task:-This is for executing the miscellaneous operations to be done as part of already created visit. Navigate the visit task screen in an already created visit (Navigation: Planning > Visit Work Package > Overview > Search the visit > Click on the visit hyperlink> view visit task in side Menu), From the drop down menu select the “ Create Unassociated Task” and click (B) Go. Furnish the details in the Task header and click on (B) Apply and (B) Cancel, you would be navigate back to the “Visit Task” Screen. Select the unassociated task and push to production. Unassociated work orders would have created. You can create Unassociated task any time during the execution, before closing of visit. -
Create Work Order Using BAPI in LSMW
Hi All,
I searched in SCN but i dint get the correct idea to create Work Order USING BAPI,
Im trying to create Work Order Using BAPI in LSWM
Can any one Give me Brief Idea to create Work Order(Either Component or Operations) (t code - IW31) using BAPI in LSMW
Regards
SmithaHi All,
I searched in SCN but i dint get the correct idea to create Work Order USING BAPI,
Im trying to create Work Order Using BAPI in LSWM
Can any one Give me Brief Idea to create Work Order(Either Component or Operations) (t code - IW31) using BAPI in LSMW
Regards
Smitha -
Steps For Goods Receipt For Work Order Using Handling Units
Hello MM gurus,
I'm new to HU Management. Can you please share with me the steps for executing a "Goods Receipt For Work Order" using Handling Units?
I created a HU (1000000026), and then using transaction COWBHUWE I tried using that HU to create a goods receipt, but I keep getting the message below:
Handling unit 1000000026 is not provided for goods receipt
Message no. VHURM046
Do you have to assign/plan HUs to Process Orders first? I think the problem is that I'm not understanding the process or the requirements for a goods receipt for work order using HU.Hello Manish Kumar,
I've been doing Handling Units testing in our sandbox environment and I've been trying to Pack a Finished Product for a Process Order using
1-Transaction code HU02 to create the Handling Unit
2-Transaction COWBHUE after creating the HU to enter the production order number and the HU number and propose it, but the it doesn't work. When I propose it, nothing happens.
3.-I also tried COWBPACK, but for some reason, when I go into COWBPACK, key in the Process Order, and then press enter, I get the following message:
You do not have authorization to create handling units for plant BP08
Message no. VHUPD500
Do you know how to solve this issue? -
How mass upload works.in KM
Hi All,
I'm new to KM and C, can any bodly tell me how Mass upload works.in KM........what are the featurs and prerqusite for it..
Thanks
ABHi,
Mass upload can be done using WEbDAV.
There are many link avialble in forum
https://www.sdn.sap.com/irj/scn/thread?messageID=1673398
https://www.sdn.sap.com/irj/scn/thread?messageID=434255
http://help.sap.com/saphelp_ep60sp2/helpdata/en/30/75b62c659d724fb908c74ade23af51/frameset.htm
If you are looking KM content transport from one landscape to other landscape(like dev to test and test to prod) then use ICE transport.
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/38effdbf-0d01-0010-c3ad-9d9547a492af
Hope the above links will help you.
Raghu -
How to link Purchase Order using account assignment category "F"* to asset
Hello,
I'd like to know how to link Purchase Order, using account assignment category "F" to asset .
When I enter asset no. in my ANEK table, po no(ebeln) and po item(ebelp) field is blank.
whether every line item in a Purchase order have differrent asset.
can anybody give me the link between asset and materal no?
Regards,
RachelHi Rachel,
Your message is a little bit confusing. There is no link between the asset and material number. If you want to post your purchase order, using account assignment F - that is internal order - you may do it. Futher, you can settle the postings from this order to asset.
You can read more here:
http://help.sap.com/saphelp_erp60_sp/helpdata/en/4f/71e7cd448011d189f00000e81ddfac/frameset.htm
Regards,
Eli -
PM: Create notification from a work order using transaction IW32.
Hi guys,
I am trying to create a Notification for a Functional Location thru Work Order Using transaction Code IW32.
The actual transaction works fine as below -
1. Open a work order in change mode using T code IW32
2. Choose tab "Objects" to see the list of functional locations.
3. Select a line with a functional loc, for which you want to create Notification & click "Create" Button at the bottom of the list.
4. Enter Notification type on the pop up screen & enter.
5. Enter the activity code, text & start date on the notif create screen & click Back. You can see the temp Notif Number in the row selected from the object list.
6. Click save on the order change screen & the Notification is saved & is associated with the order & func Loc..
However I can not do this in a program.
I tried using Batch Input method. It works, but the problem is if you have more than 1 page of the Objects (Func locations) in objects tab, you can not goto the next pages.
I also tried using BAPI_ALM_NOTIF_CREATE. Which doesnot for this purpose. It tries to create Notification but can't associate with the order.
I appreciate your help.
Thank you,
RajHi:
Check with Tcode: IBIP - Plant maintenace batch input utility tool.
Hope, it may help!
Thanks,
Murali. -
How to upload material master using BAPI
I have a flat file with 3 fields MATNR,MAKTX,MEINS and I want to create material master with 2 views basic data1 & basic data2 with three fields using BAPI
Can anyone tell me how to do this only using three fields and 2 views
and also i want to know what is the exact difference between session call transaction BAPI and LSWM methods.
Thank you,
Pradeep Reddy M.Hi Pradeep Reddy Miriyala,
This a example you can use, the views are related with each table only have to adapt to your case.
Best regards
Jaime Cordeiro
*& Report ZMM01_BAPI_01 *
REPORT ZMM01_BAPI_01 .
STRUCTURE DECLARATIONS *
TABLES: BAPIMATHEAD, "Headerdata
BAPI_MARA, "Clientdata
BAPI_MARAX, "Clientdatax
BAPI_MVKE, "SalesData
BAPI_MVKEX, "SalesDatax
BAPI_MARC, "Plantdata
BAPI_MARCX, "Plantdatax
BAPI_MBEW, "ValuationData
BAPI_MBEWX, "ValuationData
BAPI_MLGN, "Storage
BAPI_MLGNX, "StorageX
BAPI_MAKT, "Material description
BAPI_MARM,
BAPI_MARMX,
bapi_mean,
BAPI_MLAN,
BAPIRET2. "Return messages
DATA: BEGIN OF LSMW_MATERIAL_MASTER,
> Initial Data
matnr(18),
mtart(4),
WERKS(4),
VKORG(4),
VTWEG(2),
LGNUM(3),"retirar
> Basic Data 1
MAKTX(40),
MEINS(3),
MATKL(9),
BISMT(18),
SPART(2),
PRDHA(18),
BRGEW(17),
NTGEW(17),
GEWEI(3),
VOLUM(13),
VOLEH(3),
EAN11(18),
NUMTP(2),
> Sales 1
DWERK(4),
TAXKM(1),
> Sales 2
KTGRM(2),
PRODH(18),
MTPOS(4),
> Sales: General/Plant
MTVFP(2),
TRAGR(4),
LADGR(4),
PRCTR(10),
> Purchasing
Novas entradas
EKGRP(3),
KAUTB(1),
XCHPF1(1),
EKWSL(4),
WEBAZ(3),
INSMK1(1),
KORDB(1),
> Foreign Trade
STAWN(17),
MTVER(4),
HERKL(3),
HERKR(3),
> Purchase Order Text View
Identificar Campos
TextoEN(100),
TextoPT(100),
TextoPL(100),
TextoES(100),
> MRP1
DISGR(4),
DISMM(2),
DISPO(3),
DISLS(2),
BSTMI(18),
BSTRF(13),
> MRP2
BESKZ(1),
RGEKZ(1),
LGPRO(4),
LGFSB(4),
EPRIO(4),
WEBAZ1(3),
PLIFZ(3),
FHORI(3),
> MRP3
PERKZ(1),
STRGR(2),
VRMOD(1),
VINT1(3),
VINT2(3),
> MRP4
ALTSL(1),
FEVOR(3),
> Work Sch
INSMK(1),
XCHPF(1),
UEETO(3),
> Plant Storage 1
MHDRZ(4),
MHDHB(4),
> Plant Storage 2
PRCTR1(10),
EPRIO1(4),
> WM 1 S01 comum a todos
LTKZA_S01(3),
LTKZE_S01(3),
LGBKZ_S01(3),
> WM 1 SHV
LTKZA_SHV(3),
LTKZE_SHV(3),
LGBKZ_SHV(3),
> WM 1 SQW
LTKZA_SQW(3),
LTKZE_SQW(3),
LGBKZ_SQW(3),
> WM 2
LHMG1(13),
LHME1(3),
LETY1(3),
LHMG2(13),
LHME2(3),
LETY2(3),
LHMG3(13),
LHME3(3),
LETY3(3),
> Accounting 1
BKLAS(4),
VPRSV(1),
VERPR(23),
PEINH(5),
END OF LSMW_MATERIAL_MASTER.
DATA:V_FILE TYPE STRING.
DATA:VolumUnitConv(3).
DATA:UnitConv(3).
INTERNAL TABLE DECLARATIONS *
*to store the input data
DATA:
BEGIN OF it_matmaster OCCURS 0.
INCLUDE STRUCTURE LSMW_MATERIAL_MASTER.
DATA:
END OF it_matmaster.
*for material description
DATA:BEGIN OF IT_MATERIALDESC OCCURS 0.
INCLUDE STRUCTURE BAPI_MAKT .
DATA:END OF IT_MATERIALDESC.
*FOR gross wt
data: begin of it_uom occurs 0.
include structure BAPI_MARM.
data:end of it_uom.
DATA: BEGIN OF IT_UOMX OCCURS 0.
INCLUDE STRUCTURE BAPI_MARMX.
DATA:END OF IT_UOMX.
data:begin of it_mean occurs 0.
include structure bapi_mean.
data:end of it_mean.
DATA: BEGIN OF it_MLAN OCCURS 0.
include STRUCTURE BAPI_MLAN.
DATA: END OF it_MLAN.
DATA:BEGIN OF IT_MLTX OCCURS 0.
INCLUDE STRUCTURE BAPI_MLTX.
DATA:END OF IT_MLTX.
*to return messages
DATA:BEGIN OF IT_RETURN OCCURS 0.
INCLUDE STRUCTURE BAPIRET2.
DATA:END OF IT_RETURN.
DATA : imat TYPE TABLE OF bapimatinr WITH HEADER LINE.
DATA: text LIKE bapi_mltx OCCURS 0 WITH HEADER LINE.
DATA: matnrAct(18),oldMart(4).
SELECTION SCREEN
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-002.
PARAMETERS:P_FILE LIKE RLGRAP-FILENAME OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B1 .
AT SELECTION SCREEN
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = 'P_FILE'
IMPORTING
FILE_NAME = P_FILE.
TO UPLOAD THE DATA *
START-OF-SELECTION.
V_FILE = P_FILE.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = V_FILE
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
IMPORTING
FILELENGTH =
HEADER =
tables
data_tab = IT_MATMASTER
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
check sy-subrc eq 0.
DATA POPULATIONS *
LOOP AT IT_MATMASTER.
IF IT_MATMASTER-MATNR EQ '' .
oldMart = IT_MATMASTER-Mtart.
CALL FUNCTION 'MATERIAL_NUMBER_GET_NEXT'
EXPORTING
MATERIALART = IT_MATMASTER-Mtart
IMPORTING
MATERIALNR = matnrAct
RETURNCODE =
EXCEPTIONS
NO_INTERNAL_INTERVAL = 1
TYPE_NOT_FOUND = 2
OTHERS = 3
if sy-subrc = 0.
BAPIMATHEAD-MATERIAL = matnrAct.
endif.
ELSE.
BAPIMATHEAD-MATERIAL = it_matmaster-matnr.
ENDIF.
Preenchimento dos dados do ecrã inicial
BAPIMATHEAD-MATERIAL = IT_MATMASTER-MATNR.
BAPIMATHEAD-IND_SECTOR = 'M'.
BAPIMATHEAD-MATL_TYPE = IT_MATMASTER-Mtart.
"declaration of views
BAPIMATHEAD-BASIC_VIEW = 'X'.
BAPIMATHEAD-MRP_VIEW = 'X'.
BAPIMATHEAD-STORAGE_VIEW = 'X'.
BAPIMATHEAD-WAREHOUSE_VIEW = 'X'.
BAPIMATHEAD-ACCOUNT_VIEW = 'X'.
If IT_MATMASTER-Mtart EQ '31'.
BAPIMATHEAD-SALES_VIEW = 'X'.
BAPIMATHEAD-WORK_SCHED_VIEW = 'X'.
ENDIF.
If IT_MATMASTER-Mtart EQ '51'.
BAPIMATHEAD-SALES_VIEW = 'X'.
BAPIMATHEAD-WORK_SCHED_VIEW = 'X'.
ENDIF.
If IT_MATMASTER-Mtart EQ '65'.
BAPIMATHEAD-PURCHASE_VIEW = 'X'.
ENDIF.
Preenchimento de dados relativos a MARA
BAPI_MARA-BASE_UOM = IT_MATMASTER-MEINS.
BAPI_MARA-MATL_GROUP = IT_MATMASTER-MATKL.
BAPI_MARA-OLD_MAT_NO = IT_MATMASTER-BISMT.
BAPI_MARA-DIVISION = IT_MATMASTER-SPART.
BAPI_MARA-PROD_HIER = IT_MATMASTER-PRDHA.
BAPI_MARA-NET_WEIGHT = IT_MATMASTER-ntgew.
BAPI_MARA-UNIT_OF_WT = IT_MATMASTER-GEWEI.
BAPI_MARA-TRANS_GRP = IT_MATMASTER-tragr.
> Novas Entradas
IF IT_MATMASTER-Mtart EQ '65'.
BAPI_MARA-BATCH_MGMT = IT_MATMASTER-XCHPF1.
BAPI_MARA-PUR_VALKEY = IT_MATMASTER-EKWSL.
BAPI_MARAX-PUR_VALKEY = 'X'.
ELSE.
BAPI_MARA-BATCH_MGMT = IT_MATMASTER-XCHPF.
ENDIF.
> Novas Entradas
BAPI_MARA-MINREMLIFE = IT_MATMASTER-MHDRZ.
BAPI_MARA-SHELF_LIFE = IT_MATMASTER-MHDHB.
BAPI_MARAX-MATL_GROUP = 'X'.
BAPI_MARAX-OLD_MAT_NO = 'X'.
BAPI_MARAX-BASE_UOM = 'X'.
BAPI_MARAX-DIVISION = 'X'.
BAPI_MARAX-PROD_HIER = 'X'.
BAPI_MARAX-NET_WEIGHT = 'X'.
BAPI_MARAX-UNIT_OF_WT = 'X'.
BAPI_MARAX-TRANS_GRP = 'X'.
BAPI_MARAX-BATCH_MGMT = 'X'.
BAPI_MARAX-MINREMLIFE = 'X'.
BAPI_MARAX-SHELF_LIFE = 'X'.
Preencimento de dados Relativos a MKVE
BAPI_MVKE-DELYG_PLNT = IT_MATMASTER-DWERK.
BAPI_MVKE-SALES_ORG = IT_MATMASTER-VKORG.
BAPI_MVKE-DISTR_CHAN = IT_MATMASTER-VTWEG.
BAPI_MVKE-PROD_HIER = IT_MATMASTER-PRODH.
BAPI_MVKE-ITEM_CAT = IT_MATMASTER-MTPOS.
BAPI_MVKE-ACCT_ASSGT = IT_MATMASTER-KTGRM.
BAPI_MVKEX-SALES_ORG = IT_MATMASTER-VKORG.
BAPI_MVKEX-DISTR_CHAN = IT_MATMASTER-VTWEG.
BAPI_MVKEX-PROD_HIER = 'X'.
BAPI_MVKEX-ITEM_CAT = 'X'.
BAPI_MVKEX-DELYG_PLNT = 'X'.
BAPI_MVKEX-ACCT_ASSGT = 'X'.
Preencimento de dados Relativos a MARC
BAPI_MARC-PLANT = IT_MATMASTER-WERKS.
BAPI_MARC-AVAILCHECK = IT_MATMASTER-MTVFP.
BAPI_MARC-LOADINGGRP = IT_MATMASTER-LADGR.
BAPI_MARC-PROFIT_CTR = IT_MATMASTER-PRCTR.
IF NOT IT_MATMASTER-Mtart EQ '51'.
BAPI_MARC-COMM_CODE = IT_MATMASTER-STAWN.
BAPI_MARC-COUNTRYORI = IT_MATMASTER-HERKL.
BAPI_MARC-REGIONORIG = IT_MATMASTER-HERKR.
BAPI_MARCX-COMM_CODE = 'X'.
BAPI_MARCX-COUNTRYORI = 'X'.
BAPI_MARCX-REGIONORIG = 'X'.
ENDIF.
BAPI_MARC-MRP_GROUP = IT_MATMASTER-DISGR.
BAPI_MARC-MRP_TYPE = IT_MATMASTER-DISMM.
BAPI_MARC-MRP_CTRLER = IT_MATMASTER-DISPO.
BAPI_MARC-LOTSIZEKEY = IT_MATMASTER-DISLS.
BAPI_MARC-MINLOTSIZE = IT_MATMASTER-BSTMI.
BAPI_MARC-ROUND_VAL = IT_MATMASTER-BSTRF.
BAPI_MARC-PROC_TYPE = IT_MATMASTER-BESKZ.
BAPI_MARC-BACKFLUSH = IT_MATMASTER-RGEKZ .
BAPI_MARC-ISS_ST_LOC = IT_MATMASTER-LGPRO.
BAPI_MARC-DETERM_GRP = IT_MATMASTER-EPRIO.
BAPI_MARC-SM_KEY = IT_MATMASTER-FHORI.
BAPI_MARC-PERIOD_IND = IT_MATMASTER-PERKZ.
BAPI_MARC-PLAN_STRGP = IT_MATMASTER-STRGR.
BAPI_MARC-CONSUMMODE = IT_MATMASTER-VRMOD.
BAPI_MARC-BWD_CONS = IT_MATMASTER-VINT1.
BAPI_MARC-FWD_CONS = IT_MATMASTER-VINT2.
BAPI_MARC-ALT_BOM_ID = IT_MATMASTER-ALTSL.
BAPI_MARC-PRODUCTION_SCHEDULER = IT_MATMASTER-FEVOR.
IF NOT IT_MATMASTER-Mtart EQ '65'.
BAPI_MARC-IND_POST_TO_INSP_STOCK = IT_MATMASTER-INSMK.
BAPI_MARC-OVER_TOL = IT_MATMASTER-UEETO.
BAPI_MARCX-IND_POST_TO_INSP_STOCK = 'X'.
BAPI_MARCX-OVER_TOL = 'X'.
ENDIF.
> Novas Entradas
IF IT_MATMASTER-Mtart EQ '65'.
BAPI_MARC-PUR_GROUP = IT_MATMASTER-EKGRP .
BAPI_MARC-AUTO_P_ORD = IT_MATMASTER-KAUTB .
BAPI_MARC-GR_PR_TIME = IT_MATMASTER-WEBAZ .
BAPI_MARC-IND_POST_TO_INSP_STOCK = IT_MATMASTER-INSMK1 .
BAPI_MARC-SOURCELIST = IT_MATMASTER-KORDB .
BAPI_MARC-EXPIMPGRP = IT_MATMASTER-MTVER .
BAPI_MARCX-PUR_GROUP = 'X'.
BAPI_MARCX-AUTO_P_ORD = 'X'.
BAPI_MARCX-GR_PR_TIME = 'X'.
BAPI_MARCX-IND_POST_TO_INSP_STOCK = 'X'.
BAPI_MARCX-SOURCELIST = 'X'.
BAPI_MARCX-EXPIMPGRP = 'X'.
ENDIF.
> Novas Entradas
BAPI_MARCX-PLANT = IT_MATMASTER-WERKS.
BAPI_MARCX-AVAILCHECK = 'X'.
BAPI_MARCX-LOADINGGRP = 'X'.
BAPI_MARCX-PROFIT_CTR = 'X'.
BAPI_MARCX-MRP_GROUP = 'X'.
BAPI_MARCX-MRP_TYPE = 'X'.
BAPI_MARCX-MRP_CTRLER = 'X'.
BAPI_MARCX-LOTSIZEKEY = 'X'.
BAPI_MARCX-MINLOTSIZE = 'X'.
BAPI_MARCX-ROUND_VAL = 'X'.
BAPI_MARCX-PROC_TYPE = 'X'.
BAPI_MARCX-BACKFLUSH = 'X'.
BAPI_MARCX-ISS_ST_LOC = 'X'.
BAPI_MARCX-DETERM_GRP = 'X'.
BAPI_MARCX-SM_KEY = 'X'.
BAPI_MARCX-PERIOD_IND = 'X'.
BAPI_MARCX-PLAN_STRGP = 'X'.
BAPI_MARCX-CONSUMMODE = 'X'.
BAPI_MARCX-BWD_CONS = 'X'.
BAPI_MARCX-FWD_CONS = 'X'.
BAPI_MARCX-ALT_BOM_ID = 'X'.
BAPI_MARCX-PRODUCTION_SCHEDULER = 'X'.
Preencimento de dados Relativos a MLGN
BAPI_MLGN-WHSE_NO = 'S01'.
BAPI_MLGN-WITHDRAWAL = IT_MATMASTER-LTKZA_S01.
BAPI_MLGN-PLACEMENT = IT_MATMASTER-LTKZE_S01.
BAPI_MLGN-STGESECTOR = IT_MATMASTER-LGBKZ_S01.
BAPI_MLGN-L_EQUIP_1 = IT_MATMASTER-LHMG1.
BAPI_MLGN-L_EQUIP_2 = IT_MATMASTER-LHMG2.
BAPI_MLGN-L_EQUIP_3 = IT_MATMASTER-LHMG3.
BAPI_MLGN-LEQ_UNIT_1 = IT_MATMASTER-LHME1.
BAPI_MLGN-LEQ_UNIT_2 = IT_MATMASTER-LHME2.
BAPI_MLGN-LEQ_UNIT_3 = IT_MATMASTER-LHME3.
BAPI_MLGN-UNITTYPE_1 = IT_MATMASTER-LETY1.
BAPI_MLGN-UNITTYPE_2 = IT_MATMASTER-LETY2.
BAPI_MLGN-UNITTYPE_3 = IT_MATMASTER-LETY3.
BAPI_MLGNX-WHSE_NO = 'S01'.
BAPI_MLGNX-WITHDRAWAL = 'X'.
BAPI_MLGNX-PLACEMENT = 'X'.
BAPI_MLGNX-STGESECTOR = 'X'.
BAPI_MLGNX-L_EQUIP_1 = 'X'.
BAPI_MLGNX-L_EQUIP_2 = 'X'.
BAPI_MLGNX-L_EQUIP_3 = 'X'.
BAPI_MLGNX-LEQ_UNIT_1 = 'X'.
BAPI_MLGNX-LEQ_UNIT_2 = 'X'.
BAPI_MLGNX-LEQ_UNIT_3 = 'X'.
BAPI_MLGNX-UNITTYPE_1 = 'X'.
BAPI_MLGNX-UNITTYPE_2 = 'X'.
BAPI_MLGNX-UNITTYPE_3 = 'X'.
Preencimento de dados Relativos a MBEW
BAPI_MBEW,
BAPI_MBEWX,
BAPI_MBEW-VAL_CLASS = IT_MATMASTER-BKLAS.
BAPI_MBEW-PRICE_CTRL = IT_MATMASTER-VPRSV.
BAPI_MBEW-STD_PRICE = IT_MATMASTER-VERPR.
BAPI_MBEW-PRICE_UNIT = IT_MATMASTER-PEINH.
BAPI_MBEW-VAL_AREA = 'CLPS'."IT_MATMASTER-BWKEY.
BAPI_MBEWX-VAL_AREA = 'CLPS'."IT_MATMASTER-BWKEY.
BAPI_MBEWX-VAL_CLASS = 'X'.
BAPI_MBEWX-PRICE_CTRL = 'X'.
BAPI_MBEWX-STD_PRICE = 'X'.
BAPI_MBEWX-PRICE_UNIT = 'X'.
---------------------------------------------------> Material Descrition
IT_MATERIALDESC-LANGU = sy-langu. "'EN'.
IT_MATERIALDESC-MATL_DESC = IT_MATMASTER-MAKTX.
APPEND IT_materialdesc.
Gross Weight, Volume and EAN
*Volume é preciso uma rotina de conversão
CALL FUNCTION 'CONVERSION_EXIT_CUNIT_INPUT'
EXPORTING
INPUT = IT_MATMASTER-VOLEH
LANGUAGE = SY-LANGU
IMPORTING
OUTPUT = VolumUnitConv
EXCEPTIONS
UNIT_NOT_FOUND = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'CONVERSION_EXIT_CUNIT_INPUT'
EXPORTING
INPUT = IT_MATMASTER-MEINS
LANGUAGE = SY-LANGU
IMPORTING
OUTPUT = UnitConv
EXCEPTIONS
UNIT_NOT_FOUND = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IT_UOM-GROSS_WT = IT_MATMASTER-BRGEW.
IT_UOM-ALT_UNIT = UnitConv.
IT_UOM-ALT_UNIT_ISO = IT_MATMASTER-GEWEI.
IT_UOM-UNIT_OF_WT = IT_MATMASTER-GEWEI.
IT_UOM-EAN_UPC = IT_MATMASTER-EAN11.
IT_UOM-EAN_CAT = IT_MATMASTER-NUMTP.
IT_UOM-VOLUME = IT_MATMASTER-VOLUM.
IT_UOM-VOLUMEUNIT = VolumUnitConv.
IT_UOM-VOLUMEUNIT_ISO = IT_MATMASTER-VOLEH.
APPEND IT_UOM.
IT_UOMX-ALT_UNIT = IT_MATMASTER-MEINS.
IT_UOMX-ALT_UNIT_ISO = IT_MATMASTER-GEWEI.
IT_UOMX-GROSS_WT = 'X'.
IT_UOMX-UNIT_OF_WT = 'X'.
IT_UOMX-EAN_UPC = 'X'.
IT_UOMX-EAN_CAT = 'X'.
*Volume
IT_UOMX-VOLUME = 'X'.
IT_UOMX-VOLUMEUNIT = 'X'.
IT_UOMX-VOLUMEUNIT_ISO = 'X'.
APPEND IT_UOMX.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = BAPIMATHEAD
CLIENTDATA = BAPI_MARA
CLIENTDATAX = BAPI_MARAx
PLANTDATA = BAPI_MARc
PLANTDATAX = BAPI_MARcx
VALUATIONDATA = BAPI_MBEW
VALUATIONDATAX = BAPI_MBEWX
WAREHOUSENUMBERDATA = BAPI_MLGN
WAREHOUSENUMBERDATAX = BAPI_MLGNX
SALESDATA = BAPI_MVKE
SALESDATAX = BAPI_MVKEX
IMPORTING
RETURN = IT_RETURN
TABLES
MATERIALDESCRIPTION = IT_MATERIALDESC
UNITSOFMEASURE = IT_UOM
UNITSOFMEASUREX = IT_UOMX
MATERIALLONGTEXT = text
TAXCLASSIFICATIONS = it_MLAN.
if it_return-type eq 'S'.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
endif.
WAIT UP TO 10 SECONDS.
WRITE : / IT_RETURN-MESSAGE.
CLEAR: IT_MATERIALDESC[],
IT_UOM[],
IT_UOMX[],
it_MLAN[],
IT_RETURN,
text,
BAPIMATHEAD,
BAPI_MARA,
BAPI_MARAx,
BAPI_MARc,
BAPI_MARcx,
BAPI_MBEW,
BAPI_MBEWX,
BAPI_MLGN,
BAPI_MLGNX,
BAPI_MVKE,
BAPI_MVKEX
ENDLOOP. -
How to reset Work Order System Status -NCMP Not completed
Hi Friends,
Please can anyone guide me how do I reset / revert the NCMP (Not completed) System Status of the Work Order. The System Status comes after I have done the Function of "Do Not Execute".
Thanks in Advance.
AnantHi,
1. You cannot reset it back . For future cases ensure to grey out the option using Transaction Variants SHD0 for IW31/IW32 Tcodes
2.Steps to create transaction variant http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/40d1443e-0184-2c10-c68d-c612f771fe6f?quicklink=index&overridelayout=true
3.You can also explore user exit :IWO10026 User check on setting status 'Do not perform'
regards
pushpa
Maybe you are looking for
-
Hi All, I am facing problem while creating Invoice Pro Forma Ind D_ZXEP. please look below to find out the process i am following. First i create a VMI Consign using transaction VA01 for a line item After that i create delivery using transcation VL01
-
HT204266 Where can I buy a refurbished Mac?
I need a good computer for school and I don't have the money to spend $1000 on a new Mac. Does anyone know where I can get a refurbish Mac for less money.
-
Making a forum or blog with flash?
I'd like to know why I've never seen a forum (like this one) or a blog made out of flash. Is there a technical hurdle? Is it because Google won't be able to index it? Thanks.
-
Batch rename in Bridge: can you truncate filenames?
I know there are free-standing programs to do this, but: My images come out of the DSLR as DSC_001.NEF and so forth. Is it possible with Batch Rename to just strip off the DSC so that DSC_001.NEF becomes just 001.NEF??
-
On X61 (7675-CTO) can fansink FRU 42X3805 be replaced with FRU 42X4339?
I finally found some time today (actually forced time since the old fan finally quit and reported a FAN ERROR during boot) to take apart my X61 and install a new heatsink fan. Although the laptop is now re-assembled and seemingly operating normally