LSMW help with DIRs by using BAPi method
Hi experts,
I am learning LSMW and I have been given exercise which I have to finish. The question is:
Create a LSMW object for creation of DIRs by using BAPI method (UPLOAD_DOCUMENT)???
Can anyone tell me how should I go forward and what DIRs stands for... ??
I really appreciate your help..
Regards,
-Ashok Hansraj
Hello Ashok,
If you need a step - by - step approach for loading data using LSMW with various import techniques (like batch input, BAPI, IDOCS etc) you have to go thru this LSMW manual.
And the files with DIR information, you should receive those fields from your business. Because you should know the structure of the data in those files in order to maintain source and target structures.
Ask your business people over the format of the file you will be provided. In mean you can go thru this manual on this link.
http://www.sapgenie.com/saptech/lsmw.htm
Thanks,
Naren
Similar Messages
-
To transfer the data Cross the systems why we are not using BAPI Method?
Hello All,
To transfer the data Cross the systems why we are not using BAPI Method? why we are using only ALE/IDoc's?Hi Naveen,
Listing down those I know -
1. Master data is expected to be changed/created less frequestly.
2. Transactional data is expected to be chnaged/created more frequestly.
3. Transactions to create/change/display master data do no have message control integration, since you are not supposed to print/fax/mail master data to your partners.
4. Distribution of master data in generally supposed to happen within Enterprise boundry and typically you will have one central server maintaining master data which will be distributed to multiple downstream operation system (Some thing where MDM fits). So ideally when distributing master data using ALE you will be sending it to multiple systems.
5. Distributing transactional data PO/SO etc is same as sending fax/print which fits with the requirement of message control.
Hope this helps,
Regards,
Sanjeev -
Upload an excelfile to a table using BAPI method
Hi,
I would like to upload an excel file having three coulumns of data to a table using BAPI methods.
Anybody with a solution?
Thanks in advance.Hi,
You will find many posts regarding upload data from excel file. e.g. take a look at below thread.
Link: UPLOAD DATA FROM EXCEL FILE
change the given sample code in above thread with BAPI table name and pass this table to your BAPI FM.
Hope this will solve your problem.
Regards
Ahsan -
Sales order details uploading using BAPI method in LSMW
Hi Guys,
Sales order details uploading using BAPI in LSMW, could you please suggest me, is any standard method or programs is available for this.
I have some queries about this.
1) One header line having multiple line items, in this case we able to upload use the LSMW method,
if possible please tell me the steps.
2) Do we need to do any config changes while uploading data?
3) Flat file should be which format.
4) Steps to process each step wise if possible.
Please help me
Thanks,
Gourisanakar.Hi Gouri Sankar,
would you be able to upload the sales orders with multiple line items using BAPI LSMW?
if so could you plz suggest?
Thanks in advance.
Suresh/ -
LSMW using BAPI method for ME21N
Hi to all,
I am using LSMW BAPI method for the transaction ME21N Iam able to post a PO document successfully, But in my flat file I have a header and followed by item in the same line, while I was posting with same header for different line items its posting different PO's for different line items but suppose it has to post one document with multiple items.
My flat file fields are like this : (where as ABCD my header and rest are line items) I am using only one structure 'podata' in LSMW and I am not using any identifier.
header--Line items
A B C D S P Q W E X
A B C D 1 D 3 F K L
Business Object - BUS2012
Method - CREATEFROMDATA1
Message Type - PORDCR1
Basic Type - PORDCR101
As per my requirement if I have multiple line items for the same header then only one PO should be posted.
Could you suggest me, How can I achieve this.
Thanks,
LahariHi Jurgen,
Thanks for your reply.
As poer your suggestion, I passed my flat file data into a single file and in the begin of transaction, I divided the data into 2 structures as Header & Item.
Still I am unable to achieve the desired results, can you please elaborate more on how SAP internally joins the structures again.
To be more clear my flat file data look like this :
217836 NB 1826162667 0127 00 1 LEAN SIX SIGMA PRIMER MRO Z 4.00 EA 60.00 1 EA
217836 NB 1826162667 0127 00 2 LEAN SIX SIGMA PRIMER MRO Z 4.00 EA 860.00 1 EA
217836 NB 1826162668 0127 00 1 LEAN SIX SIGMA PRIMER MRO Z 4.00 EA 160.00 1 EA
217836 NB 1826162668 0127 00 2 LEAN SIX SIGMA PRIMER MRO Z 4.00 EA 560.00 1 EA
The bold ones being header and the remaining Items, the underlined field is PO number.
In normal process this file is considered to have 4 records, and tries to create 4 PO's.But my requirement is to create only 2 PO's with 2 items each.
Thanks.
Lahari -
Storage location Data is not saving in table MARD using BAPI method.
Hi Experts,
TABLES: T001L, "Storage Locations
MARA, "General Material Data
MAKT, "Material Descriptions
MBEW, "Material Valuation
MARC, "Plant Data for Material
MARD. "Storage Location Data for Mate
DATA: BAPI_HEAD LIKE BAPIMATHEAD, "MATERIAL
BAPI_MAKT LIKE BAPI_MAKT, "Material Description
BAPI_MARA1 LIKE BAPI_MARA, "Client Data
BAPI_MARAX LIKE BAPI_MARAX,
BAPI_MARC1 LIKE BAPI_MARC, "Plant View
BAPI_MARCX LIKE BAPI_MARCX,
BAPI_MBEW1 LIKE BAPI_MBEW, "Accounting View
BAPI_MBEWX LIKE BAPI_MBEWX,
BAPI_MARD1 LIKE BAPI_MARD, "Storage location
BAPI_MARDX LIKE BAPI_MARDX,
BAPI_RETURN LIKE BAPIRET2.
DATA: BEGIN OF INT_MAKT OCCURS 100.
INCLUDE STRUCTURE BAPI_MAKT.
DATA: END OF INT_MAKT.
DATA: BEGIN OF INT_MAT OCCURS 100,
WERKS(4), "Plant
LGORT(4), "Storage location
MTART(4), "Material type
MATNR(18), "Material number
MAKTX(40), "Material description
MATKL(9) , "Material group
MBRSH(1), "Industry sector
MEINS(3), "Base unit of measure
GEWEI(3), "Weight Unit
SPART(2), "Division
EKGRP(3), "Purchasing group
VPRSV(1), "Price control indicator
STPRS(12), "Standard price
PEINH(3), "Price unit
SPRAS(2), "Language key
BKLAS(4), "VALUATION CLASS
VERPR TYPE VERPR_BAPI, "MOVING PRICE
BWTTY(1), "Valuation Catogory
MLAST(1), "Price determination
MLMAA(1), "Material Ledger
EKLAS(4), "Valuation Class for sales order stock
QKLAS(4), "Valuation Class for Project Stock
ZKPRS TYPE DZKPRS, "Future price
ZKDAT TYPE DZKDAT, "Valid From Date
BWPRS TYPE BWPRS, "Tax price 1
BWPS1 TYPE BWPS1, "Tax price 2
VJBWS TYPE VJBWS, "Tax price 3
ABWKZ TYPE ABWKZ, "Devaluatin indicator
BWPRH TYPE BWPRH, "Commercial price 1
BWPH1 TYPE BWPH1, "Commercial price 2
VJBWH TYPE VJBWH, "Commercial Price 3
XLIFO(1), "LIFO/FIFO revelant
MYPOL(4), "Pool no for LIFO
MMSTA(2), "Plant specific material status
AUSME TYPE AUSME, "Unit of issue
QMATA(6), "Material Authorization group
RBNRM(9), "Catalog Profile
WEBAZ TYPE WEBAZ, "Goods reciept processing time in days
PRFRQ TYPE PRFRQ, "Recurring Insepction
SSQSS(8), "QM Control key
QZGTP(4), "Certificate Type
QSSYS(4), "Required QM system for vendor
END OF INT_MAT.
DATA: V_MATNR TYPE MARA-MATNR.
SELECT-OPTIONS:
PLANT FOR MARC-WERKS OBLIGATORY MEMORY ID PLT,
S_LGORT FOR MARD-LGORT MEMORY ID STL,
MATERIAL FOR MARA-MATNR MEMORY ID MAT,
MATLTYPE FOR MARA-MTART MEMORY ID MTY,
DIVISION FOR MARA-SPART MEMORY ID DIV.
PARAMETERS: F_FILE LIKE RLGRAP-FILENAME
DEFAULT 'C:\DATA\ZMATERIAL.XLS' MEMORY ID F_FILE,
GETDATA AS CHECKBOX, "Tick to download materials data to local harddisk
UPDDATA AS CHECKBOX. "Tick to update date to Materials Master
IF GETDATA = 'X'.
PERFORM DOWNLOAD_DATA.
PERFORM DOWNLOAD_FILE.
ENDIF.
IF UPDDATA = 'X'.
PERFORM UPLOAD_FILE.
PERFORM UPDATE_MM.
ENDIF.
FORM DOWNLOAD_DATA.
SELECT * FROM MARC WHERE LVORM EQ ' '
AND WERKS IN PLANT
AND MATNR IN MATERIAL.
CLEAR MARA.
SELECT SINGLE * FROM MARA WHERE MATNR = MARC-MATNR.
CHECK MATLTYPE.
CHECK DIVISION.
CLEAR MBEW.
SELECT SINGLE * FROM MBEW WHERE MATNR = MARC-MATNR
AND BWKEY = MARC-WERKS.
CLEAR MAKT.
SELECT SINGLE * FROM MAKT WHERE SPRAS = 'EN'
AND MATNR = MARC-MATNR.
CLEAR MARD.
SELECT SINGLE * FROM MARD WHERE WERKS IN PLANT
AND LGORT IN S_LGORT.
WRITE:/ MARC-WERKS, "Plant
MARD-LGORT, "Storage location
MARA-MTART, "Material type
MARA-MATNR, "Material number
MARA-MATKL, "Material group
MARA-MBRSH, "Industry sector
MARA-MEINS, "Base unit of measure
MARA-GEWEI, "Weight Unit
MARA-SPART, "Division
MARC-EKGRP, "Purchasing group
MBEW-VPRSV, "Price control indicator
MBEW-STPRS, "Standard price
MBEW-PEINH, "Price unit
MBEW-BKLAS, "VALUE CLASS
MAKT-SPRAS, "Language key
MBEW-BKLAS, "Valuation Class
MBEW-VERPR, "Moving price
MAKT-MAKTX, "Material description
MBEW-BWTTY, "Valutaion Catogorey
MBEW-MLAST, "Price Determination
MBEW-MLMAA, "Material Ledger
MBEW-EKLAS, "Valuation class for Sales order stock
MBEW-QKLAS, "Valutaion Class for Project Stock
MBEW-ZKPRS, "Future Price
MBEW-ZKDAT, "Valid From Date
MBEW-BWPRS, "Tax price 1
MBEW-BWPS1, "Tax price 2
MBEW-VJBWS, "Tax price 3
MBEW-ABWKZ, "Devaluatin indicator
MBEW-BWPRH, "Commercial price 1
MBEW-BWPH1, "Commercial price 2
MBEW-VJBWH, "Commercial Price 3
MBEW-XLIFO, "LIFO/FIFO revelant
MBEW-MYPOL, "Pool no for LIFO
MARC-MMSTA, "Plant specific material status
MARC-AUSME, "Unit of issue
MARC-QMATA, "Material Authorization group
MARA-RBNRM, "Catalog Profile
MARC-WEBAZ, "Goods reciept processing time in days
MARC-PRFRQ, "Recurring Insepction
MARC-SSQSS, "QM Control key
MARC-QZGTP, "Certificate Type
MARC-QSSYS. "Required QM system for vendor
INT_MAT-WERKS = MARC-WERKS. "Plant
INT_MAT-LGORT = MARD-LGORT. "Storage Location
INT_MAT-MTART = MARA-MTART. "Material type
INT_MAT-MATNR = MARA-MATNR. "Material number
INT_MAT-MAKTX = MAKT-MAKTX. "Material description
INT_MAT-MATKL = MARA-MATKL. "Material group
INT_MAT-MBRSH = MARA-MBRSH. "Industry sector
INT_MAT-MEINS = MARA-MEINS. "Base unit of measure
INT_MAT-GEWEI = MARA-GEWEI. "Weight Unit
INT_MAT-SPART = MARA-SPART. "Division
INT_MAT-EKGRP = MARC-EKGRP. "Purchasing group
INT_MAT-VPRSV = MBEW-VPRSV. "Price control indicator
INT_MAT-STPRS = MBEW-STPRS. "Standard price
INT_MAT-PEINH = MBEW-PEINH. "Price unit
INT_MAT-SPRAS = MAKT-SPRAS. "Language key
INT_MAT-BKLAS = MBEW-BKLAS. "VALVATION CLASS
INT_MAT-VERPR = MBEW-VERPR. "MOVING price
INT_MAT-BWTTY = MBEW-BWTTY. "Valutaion Catogorey
INT_MAT-MLAST = MBEW-MLAST. "Price Determination
INT_MAT-MLMAA = MBEW-MLMAA. "Material Ledger
INT_MAT-EKLAS = MBEW-EKLAS. "Valuation class forS.O Stock
INT_MAT-QKLAS = MBEW-QKLAS. "Valutaion Class for Project
INT_MAT-ZKPRS = MBEW-ZKPRS. "Future Price
INT_MAT-ZKDAT = MBEW-ZKDAT. "Valid From Date
INT_MAT-BWPRS = MBEW-BWPRS. "Tax price 1
INT_MAT-BWPS1 = MBEW-BWPS1. "Tax price 2
INT_MAT-VJBWS = MBEW-VJBWS. "Tax price 3
INT_MAT-ABWKZ = MBEW-ABWKZ. "Devaluatin indicator
INT_MAT-BWPRH = MBEW-BWPRH. "Commercial price 1
INT_MAT-BWPH1 = MBEW-BWPH1. "Commercial price 2
INT_MAT-VJBWH = MBEW-VJBWH. "Commercial Price 3
INT_MAT-XLIFO = MBEW-XLIFO. "LIFO/FIFO revelant
INT_MAT-MYPOL = MBEW-MYPOL. "Pool no for LIFO
INT_MAT-MMSTA = MARC-MMSTA. "Plant specific material
INT_MAT-AUSME = MARC-AUSME. "Unit of issue
INT_MAT-QMATA = MARC-QMATA. "Material Authorization group
INT_MAT-RBNRM = MARA-RBNRM. "Catalog Profile
INT_MAT-WEBAZ = MARC-WEBAZ. "Goods reciept processing
INT_MAT-PRFRQ = MARC-PRFRQ. "Recurring Insepction
INT_MAT-SSQSS = MARC-SSQSS. "QM Control key
INT_MAT-QZGTP = MARC-QZGTP. "Certificate Type
INT_MAT-QSSYS = MARC-QSSYS. "Required QM system for
APPEND INT_MAT.
CLEAR INT_MAT.
ENDSELECT.
ENDFORM.
FORM DOWNLOAD_FILE.
call function 'WS_DOWNLOAD'
EXPORTING
FILENAME = F_FILE
FILETYPE = 'DAT'
FILETYPE = 'WK1'
tables
data_tab = INT_MAT
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10.
IF SY-SUBRC = 0.
FORMAT COLOR COL_GROUP.
WRITE:/ 'Data Download Successfully to your local harddisk'.
SKIP.
ENDIF.
ENDFORM.
FORM UPLOAD_FILE.
call function 'WS_UPLOAD'
EXPORTING
FILENAME = F_FILE
FILETYPE = 'DAT'
FILETYPE = 'WK1'
tables
data_tab = INT_MAT
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10.
IF SY-SUBRC = 0.
FORMAT COLOR COL_GROUP.
WRITE:/ 'Data Upload Successfully from your local harddisk'.
SKIP.
ENDIF.
ENDFORM.
FORM UPDATE_MM.
LOOP AT INT_MAT.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
INPUT = INT_MAT-MATNR
IMPORTING
OUTPUT = INT_MAT-MATNR
EXCEPTIONS
LENGTH_ERROR = 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.
Header
BAPI_HEAD-MATERIAL = INT_MAT-MATNR.
BAPI_HEAD-IND_SECTOR = INT_MAT-MBRSH.
BAPI_HEAD-MATL_TYPE = INT_MAT-MTART.
BAPI_HEAD-BASIC_VIEW = 'X'.
BAPI_HEAD-PURCHASE_VIEW = 'X'.
BAPI_HEAD-ACCOUNT_VIEW = 'X'.
Material Description
REFRESH INT_MAKT.
INT_MAKT-LANGU = INT_MAT-SPRAS.
INT_MAKT-MATL_DESC = INT_MAT-MAKTX.
APPEND INT_MAKT.
Client Data - Basic
BAPI_MARA1-MATL_GROUP = INT_MAT-MATKL.
BAPI_MARA1-BASE_UOM = INT_MAT-MEINS.
BAPI_MARA1-UNIT_OF_WT = INT_MAT-GEWEI.
BAPI_MARA1-DIVISION = INT_MAT-SPART.
BAPI_MARAX-MATL_GROUP = 'X'.
BAPI_MARAX-BASE_UOM = 'X'.
BAPI_MARAX-UNIT_OF_WT = 'X'.
BAPI_MARAX-DIVISION = 'X'.
Plant - Purchasing
BAPI_MARC1-PLANT = INT_MAT-WERKS.
BAPI_MARC1-PUR_GROUP = INT_MAT-EKGRP.
BAPI_MARC1-PUR_STATUS = INT_MAT-MMSTA.
BAPI_MARC1-ISSUE_UNIT = INT_MAT-AUSME.
BAPI_MARC1-QM_AUTHGRP = INT_MAT-QMATA.
BAPI_MARC1-GR_PR_TIME = INT_MAT-WEBAZ.
BAPI_MARC1-INSP_INT = INT_MAT-PRFRQ.
BAPI_MARC1-CTRL_KEY = INT_MAT-SSQSS.
BAPI_MARC1-CERT_TYPE = INT_MAT-QZGTP.
BAPI_MARC1-QM_RGMTS = INT_MAT-QSSYS.
BAPI_MARCX-PLANT = INT_MAT-WERKS.
BAPI_MARCX-PUR_GROUP = 'X'.
BAPI_MARCX-PUR_STATUS = 'X'.
BAPI_MARCX-ISSUE_UNIT = 'X'.
BAPI_MARCX-QM_AUTHGRP = 'X'.
BAPI_MARCX-GR_PR_TIME = 'X'.
BAPI_MARCX-INSP_INT = 'X'.
BAPI_MARCX-CTRL_KEY = 'X'.
BAPI_MARCX-CERT_TYPE = 'X'.
BAPI_MARCX-QM_RGMTS = 'X'.
Accounting 1
BAPI_MBEW1-VAL_AREA = INT_MAT-WERKS.
BAPI_MBEW1-PRICE_CTRL = INT_MAT-VPRSV.
BAPI_MBEW1-STD_PRICE = INT_MAT-STPRS.
BAPI_MBEW1-PRICE_UNIT = INT_MAT-PEINH.
BAPI_MBEW1-MOVING_PR = INT_MAT-VERPR.
BAPI_MBEW1-VAL_CLASS = INT_MAT-BKLAS.
BAPI_MBEW1-VAL_CAT = INT_MAT-BWTTY.
BAPI_MBEW1-ML_SETTLE = INT_MAT-MLAST.
BAPI_MBEW1-ML_ACTIVE = INT_MAT-MLMAA.
BAPI_MBEW1-VM_SO_STK = INT_MAT-EKLAS.
BAPI_MBEW1-VM_P_STOCK = INT_MAT-QKLAS.
BAPI_MBEW1-FUTURE_PR = INT_MAT-ZKPRS.
BAPI_MBEW1-VALID_FROM = INT_MAT-ZKDAT.
*ACCOUNTING 2
BAPI_MBEW1-TAXPRICE_1 = INT_MAT-BWPRS.
BAPI_MBEW1-TAXPRICE_2 = INT_MAT-BWPS1.
BAPI_MBEW1-TAXPRICE_3 = INT_MAT-VJBWS.
BAPI_MBEW1-DEVAL_IND = INT_MAT-ABWKZ.
BAPI_MBEW1-COMMPRICE1 = INT_MAT-BWPRH.
BAPI_MBEW1-COMMPRICE2 = INT_MAT-BWPH1.
BAPI_MBEW1-COMMPRICE3 = INT_MAT-VJBWH.
BAPI_MBEW1-LIFO_FIFO = INT_MAT-XLIFO.
BAPI_MBEW1-POOLNUMBER = INT_MAT-MYPOL.
BAPI_MBEWX-VAL_AREA = INT_MAT-WERKS.
BAPI_MBEWX-PRICE_CTRL = 'X'.
BAPI_MBEWX-STD_PRICE = 'X'.
BAPI_MBEWX-PRICE_UNIT = 'X'.
BAPI_MBEWX-MOVING_PR = 'X'.
BAPI_MBEWX-VAL_CLASS = 'X'.
BAPI_MBEWX-VAL_CAT = 'x'.
BAPI_MBEWX-ML_SETTLE = 'X'.
BAPI_MBEWX-ML_ACTIVE = 'X'.
BAPI_MBEWX-VM_SO_STK = 'X'.
BAPI_MBEWX-VM_P_STOCK = 'X'.
BAPI_MBEWX-FUTURE_PR = 'X'.
BAPI_MBEWX-VALID_FROM = 'X'.
BAPI_MBEWX-TAXPRICE_1 = 'X'.
BAPI_MBEWX-TAXPRICE_2 = 'X'.
BAPI_MBEWX-TAXPRICE_3 = 'X'.
BAPI_MBEWX-DEVAL_IND = 'X'.
BAPI_MBEWX-COMMPRICE1 = 'X'.
BAPI_MBEWX-COMMPRICE2 = 'X'.
BAPI_MBEWX-COMMPRICE3 = 'X'.
BAPI_MBEWX-LIFO_FIFO = 'X'.
BAPI_MBEWX-POOLNUMBER = 'X'.
*Storage Locations
BAPI_MARD1-PLANT = INT_MAT-WERKS.
BAPI_MARD1-STGE_LOC = INT_MAT-LGORT.
BAPI_MARDX-PLANT = INT_MAT-WERKS.
BAPI_MARDX-STGE_LOC = INT_MAT-LGORT.
WRITE:/ BAPI_HEAD-MATERIAL, BAPI_MARC1-PLANT ,BAPI_MARD1-STGE_LOC.
call function 'BAPI_MATERIAL_SAVEDATA'
exporting
HEADDATA = BAPI_HEAD
CLIENTDATA = BAPI_MARA1
CLIENTDATAX = BAPI_MARAX
PLANTDATA = BAPI_MARC1
PLANTDATAX = BAPI_MARCX
FORECASTPARAMETERS =
FORECASTPARAMETERSX =
PLANNINGDATA =
PLANNINGDATAX =
<b> STORAGELOCATIONDATA = BAPI_MARD1
STORAGELOCATIONDATAX = BAPI_MARDX</b>
VALUATIONDATA = BAPI_MBEW1
VALUATIONDATAX = BAPI_MBEWX
WAREHOUSENUMBERDATA =
WAREHOUSENUMBERDATAX =
SALESDATA = BAPI_MVKE1
SALESDATAX = BAPI_MVKEX
STORAGETYPEDATA =
STORAGETYPEDATAX =
IMPORTING
RETURN = BAPI_RETURN
TABLES
MATERIALDESCRIPTION = INT_MAKT
UNITSOFMEASURE =
UNITSOFMEASUREX =
INTERNATIONALARTNOS =
MATERIALLONGTEXT =
TAXCLASSIFICATIONS =
RETURNMESSAGES =
PRTDATA =
PRTDATAX =
EXTENSIONIN =
EXTENSIONINX =
IF BAPI_RETURN-TYPE = 'E'.
WRITE:/ 'Error Message ', BAPI_RETURN-MESSAGE.
ENDIF.
ENDLOOP.
ENDFORM.
<b>i am using this bapi method to copy materials from one plant to another plant using storage location so here what happenig is everyting is going correct but only the storage location data is not saving in table mard so any body faced this kind of problem please tell me.... and one more dbt
bapi_marcx-pur_status = 'x' what is 'X' here??? is that mandatory field or required field ???
points wil be rewarded.
reagrds,
sunil k airam.In the HEADDATA structure, STORAGE_VIEW should also be set as 'X' , in order to update storage location data
for example
BAPI_HEAD-STORAGE_VIEW = 'X'.
Also, PUR_STATUS corresponds to field MARA-MSTAE whose domain has value table T141, therefore values in the field are checked against T141
Edited by: Harris Veziris on May 12, 2008 12:37 PM -
Creating a material with its classification using BAPI's
Hi there,
I am creating a function module to create a material master using BAPI's. I am using the BAPI 'BAPI_MATERIAL_SAVEDATA'. However I did not find a way to pass the classification details to this BAPI. As I need to create a classification data along with material basic data, can you please tell me how I can do it. Are there any BAPI's which I can use to create classification data?
Please help, I have stuck here from a longer time.
Thanks,
Ganesh.hi
good
Use FM 'BAPI_OBJCL_GETDETAIL' to retrieve the classification data.
Import params:
1. Object key : give the material number
2. Object table : give material master table i.e. MARA
3. Class Num: Give the class name from which u have to fetch the characteristic data
4. Class type: give '001' for material
You will get the classification data in the following tables:
ALLOCVALUESNUM
ALLOCVALUESCHAR
ALLOCVALUESCURR
This should be helpful, do get back in case of any queries.
thanks
mrutyun^ -
Problem in Storing ByteArray(Value) with String (Key) using put method
Hello Folks:
I wish to store a byte array with associated with a String. For this I use the put method in Java which stores put(Object key, Object value). I have written a piece of code which works but I am not able to understand it. Its not outputing what I want but something else.
I guess, I have some ignorance.
When I compile using
$javac testing.java propsput.java
$java testing
I get the following output.
Bytes Array:[B@1372a1a
I understand that B stands for Bytes array. Also, If I change the String I get the same thing. If I modify the code for Integer array
and store some Integer array I get [I@1372a1a.
I fail to understand why I am getting this 1372a1a again and again.
Instead where is my array.
May be I am not using the method getValue correctly.
Thank You very much for your help
Regards
//testing.java
import java.io.*;
import java.util.*;
public class testing{
public static void main(String args[]){
propsput headers=new propsput();
String s="Let me See how you do it";
byte buf[]=s.getBytes();
headers.put("Bytes Array",buf);
//propsput.java
import java.util.*;
import java.io.*;
public class propsput{
public void put (String key, byte[] value) throws IllegalArgumentException{
HashMap _props =new HashMap();
_props.put(key, value);
Set set =_props.entrySet();
Iterator i=set.iterator();
while(i.hasNext())
Map.Entry me=(Map.Entry) i.next();
System.out.print(me.getKey()+":");
System.out.println(me.getValue());
----------------------------------------------------------------Hi Thanks for your help.
But I have included your method in the propsput class and also using it like this in the propsput class.
while(i.hasNext())
Map.Entry me=(Map.Entry) i.next();
System.out.print(me.getKey()+":");
byte a[]=me.getValue();
showBytes(a);
But while compiling with javac I get the following error:
propsput.java:24: incompatible types
found : java.lang.Object
required: byte[]
byte a[]=me.getValue();
Please let me know how should I use it so as to print my String.
Well, its still not clear in the previous code (my First Message) that why I am gettinng "1372a1a" everytime. (Even if I change the String. When I change the array to be an Integer array I get [I@1372a1a )
Othewise in the case of Strings I get ( [B@1372a1a)
Bytes Array:[B@1372a1a
Thanks and Regards -
Help in Quotation creation using BAPI
I want to create Quotation with reference to Inquiry. I am using std BAPI 'BAPI_QUOTATION_CREATEFROMDATA2' but I am not able to crate with reference to Inquiry. If you see the std tcode VA21 there is option to create with reference; there you can put the inquiry number. This functionality, I want to implement using BAPI.
Can anybody tell me how to achieve this.
Thanks in stackNilesh,
There is a problem if you use the BAPI 'BAPI_QUOTATION_CREATEFROMDATA2', the table flow will not be maintained (i.e) it will not maintain the document flow which you can view using
VA13(Inquiry)->Document flow(F5). It will allow you to create any number of quotations for the same inquiry. This will be the case even if you use the BAPI 'BAPI_QUOTATION_CREATEFROMDATA'.
The alternative you can use is use a BDC program for just creating the Quotation(VA21). Then use the BAPI 'BAPI_CUSTOMERQUOTATION_CHANGE' to change the quotation. I have done this before and it is working perfectly fine. Hope this solves your issue.
Note: Reward points if found helpful. -
Need Help With Military DTD Using FrameMaker 8
Fellow Forum Members,
I hope someone out there with experience in using Department of Defense DTDs with FrameMaker can contribute to this thread.
Attached is the MIL STD 400051-2 DTD that needs to play with FrameMaker. Does anyone out there know where I could find FrameMaker templates already setup that comply and play with the MIL STD 400051-2 DTD standard? If the Department of Defense is freely distributing the MIL STD 400051-2 DTD, shouldn't somebody in the Department of Defense also be providing MIL STD 400051-2 FrameMaker Templates for free that are already setup? I would greatly appreciate if anyone out there could provide an online source where I could download MIL STD 400051-2 FrameMaker templates.
Lastly, can anyone out there clarify what the purpose of the entities are inside the "Charant" and "Boilerplate" folders? The Department of Defense does not provide a readme file that define what the "Charant" and "Boilerplate" folders are about.
Any info will be greatly appreciated. Thanks.I'll answer the specifics that I know about your questions, but please look at the post from Srini for additional info:
1) Do i need to do full export using SYS/SYSTEM user.
exp80 system/manager file=c:full.dmp log=c:\full.txt full=y consistent=yA full export will move as much information (metadata/data) as possible. In order to do a full export/import, you need to do this from a
privileged account. A privileged account is one with EXP_FULL_DATABASE for export and IMP_FULL_DATABASE for import.
2) Will there be any data corruption while export.The data in the objects that you are exporting is being read, nothing is written to user data. I'm not sure what this is available in 8.0.6,
but if you need a consistent export, look to see if consistent=y is available in 8.0.6. All this means is that the dump file created will have
consistent data in it.
3) Is export/import the only method of migration/upgradation.If you are changing hardware, the only supported way from 8.0 to 10.2.0.4, that I know of, is using exp/imp.
Hope this helps.
Dean -
Help with Photo Gallery using XML file
I am creating a photo gallery using Spry. I used the Photo Gallery Demo (Photo Gallery Version 2) on the labs.adobe.com website. I was successful in creating my site, and having the layout I want. However I would like to display a caption with each photo that is in the large view.
As this example uses XML, I updated my file to look like this:
<photos id="images">
<photo path="aff2010_01.jpg" width="263" height="350" thumbpath="aff2010_01.jpg" thumbwidth="56"
thumbheight="75" pcaption="CaptionHere01"></photo>
<photo path="aff2010_02.jpg" width="350" height="263" thumbpath="aff2010_02.jpg" thumbwidth="75"
thumbheight="56" pcaption="CaptionHere02"></photo>
<photo path="aff2010_03.jpg" width="350" height="263" thumbpath="aff2010_03.jpg" thumbwidth="75"
thumbheight="56" pcaption="CaptionHere03"></photo>
</photos>
The images when read into the main file (index.asp) show the images in the thumbnail area and display the correct image in the picture pain. Since I added the pcaption field to the XML file, how do I get it to display? The code in my index.html file looks like this:rest of the code here:
<div id="previews">
<div id="controls">
<ul id="transport">
<li><a href="#" class="previousBtn" title="Previous">Previous</a></li>
<li><a href="#" class="playBtn" title="Play/Pause" id="playLabel"><span class="playLabel">Play</span><span class="pauseLabel">Pause</span></a></li>
<li><a href="#" class="nextBtn" title="Next">Next</a></li>
</ul>
</div>
<div id="thumbnails" spry:region="dsPhotos" class="SpryHiddenRegion">
<div class="thumbnail" spry:repeat="dsPhotos"><a href="{path}"><img alt="" src="{thumbpath}"/></a><br /></div>
<p class="ClearAll"></p>
</div>
</div>
<div id="picture">
<div id="mainImageOutline"><img id="mainImage" alt="main image" src=""/><br /> Caption: {pcaption}</div>
</div>
<p class="clear"></p>
</div>
Any help with getting the caption to display would be greatly appreciated. The Caption {pcaption} does not work, -
Help with Switch statements using Enums?
Hello, i need help with writing switch statements involving enums. Researched a lot but still cant find desired answer so going to ask here. Ok i'll cut story short.
Im writing a calculator program. The main problem is writing code for controlling the engine of calculator which sequences of sum actions.
I have enum class on itself. Atm i think thats ok. I have another class - the engine which does the work.
I planned to have a switch statement which takes in parameter of a string n. This string n is received from the user interface when users press a button say; "1 + 2 = " which each time n should be "1", "+", "2" and "=" respectively.
My algorithm would be as follows checking if its a operator(+) a case carry out adding etc.. each case producing its own task. ( I know i can do it with many simple if..else but that is bad programming technique hence im not going down that route) So here the problem arises - i cant get the switch to successfully complete its task... How about look at my code to understand it better.
I have posted below all the relevant code i got so far, not including the swing codes because they are not needed here...
ValidOperators v;
public Calculator_Engine(ValidOperators v){
stack = new Stack(20);
//The creation of the stack...
this.v = v;
public void main_Engine(String n){
ValidOperators v = ValidOperators.numbers;
*vo = vo.valueOf(n);*
switch(v){
case Add: add(); break;
case Sub: sub(); break;
case Mul: Mul(); break;
case Div: Div(); break;
case Eq:sum = stack.sPop(); System.out.println("Sum= " + sum);
default: double number = Integer.parseInt(n);
numberPressed(number);
break;
//default meaning its number so pass it to a method to do a job
public enum ValidOperators {
Add("+"), Sub("-"), Mul("X"), Div("/"),
Eq("="), Numbers("?"); }
Notes*
It gives out error: "No enum const class ValidOperators.+" when i press button +.
It has nothing to do with listeners as it highlighted the error is coming from the line:switch(v){
I think i know where the problem is.. the line "vo = vo.valueOf(n);"
This line gets the string and store the enum as that value instead of Add, Sub etc... So how would i solve the problem?
But.. I dont know how to fix it. ANy help would be good
Need more info please ask!
Thanks in advance.demo:
import java.util.*;
public class EnumExample {
enum E {
STAR("*"), HASH("#");
private String symbol;
private static Map<String, E> map = new HashMap<String, E>();
static {
put(STAR);
put(HASH);
public String getSymbol() {
return symbol;
private E(String symbol) {
this.symbol = symbol;
private static void put(E e) {
map.put(e.getSymbol(), e);
public static E parse(String symbol) {
return map.get(symbol);
public static void main(String[] args) {
System.out.println(E.valueOf("STAR")); //succeeds
System.out.println(E.parse("*")); //succeeds
System.out.println(E.parse("STAR")); //fails: null
System.out.println(E.valueOf("*")); //fails: IllegalArgumentException
} -
How to create material using BAPI Methods?
hi,
how to create material master dat using BAPI?
could u guide me
i will be waiting for reply.
REGARDS
ESWAR.Hi eswar,
Try this code to create gods mmovement...
DATA: GOODSMVT_HEADER LIKE BAPI2017_GM_HEAD_01,
" Material Document Header Data
GOODSMVT_CODE LIKE BAPI2017_GM_CODE,
" Assign code to transaction for BAPI goods movement
MATERIALDOCUMENT LIKE BAPI2017_GM_HEAD_RET-MAT_DOC,
" Number of Material Document
GOODSMVT_ITEM LIKE BAPI2017_GM_ITEM_CREATE OCCURS 0 WITH HEADER
LINE,
" Create Material Document Item
RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE
" Return table for messages
*Fill values in header
GOODSMVT_HEADER-PSTNG_DATE = '20030825'.
GOODSMVT_HEADER-DOC_DATE = '20030802'.
*Fill GOODSMVT_CODE
GOODSMVT_CODE-GM_CODE = '05' .
*Fill Item Table
GOODSMVT_ITEM-MATERIAL = '100-100'.
GOODSMVT_ITEM-PLANT = '1000'.
GOODSMVT_ITEM-STGE_LOC = '0001'.
GOODSMVT_ITEM-MOVE_TYPE = '501'.
GOODSMVT_ITEM-ENTRY_QNT = '50'.
GOODSMVT_ITEM-ITEM_TEXT = 'Test Sanket'.
*GOODSMVT_ITEM-COSTCENTER = '1000'.
APPEND GOODSMVT_ITEM.
*Create Good's movement
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
GOODSMVT_HEADER = GOODSMVT_HEADER
GOODSMVT_CODE = GOODSMVT_CODE
IMPORTING
MATERIALDOCUMENT = MATERIALDOCUMENT
TABLES
GOODSMVT_ITEM = GOODSMVT_ITEM
RETURN = RETURN.
*Commit BAPI
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
*Display Goods movement number
FORMAT COLOR 6 INVERSE ON.
READ TABLE RETURN WITH KEY TYPE = 'E'.
IF SY-SUBRC = 0.
WRITE: /,'ERROR! Goods movement not created'.
ELSE.
WRITE: /,'Goods movent number',MATERIALDOCUMENT COLOR 5,
'posted for material',GOODSMVT_ITEM-MATERIAL.
ENDIF.
FORMAT COLOR OFF INVERSE OFF.
try this on report program and create a goods movement.
Sanket. -
Help with swap images using rollovers
I have a website created using DW CS5. Recently purchased FW CS5 to help with web graphics and design. I am trying to create a list of numbers that will swap with images. The intial page would simply be a list of numbers and 1 static image. Each number, when hovered will change the image with another. I've attempted this by first using DW and not having much success with FW either.
If able to complete this using FW, is it possible to export the file for use in DW? Then insert into an AP Div?You're over-complicating it.
Simply hit File>Save once you're done in photoshop.
ian -
LSMW Sales Order creation using Bapi method
Hi folks ,
iam doing Lsmw bapimethod ,sales order creation .In the step start idoc processing iam getting error "Has Not been Accepted for Processing ",why iam not getting plz let me know points will be awarded for all answers .Hi,
You need to set the IDOC settings in the initial LSMW screen. It will be there in menu path.
Award points if helpful
Regards,
RamaKrishna C
Maybe you are looking for
-
Umwandlung .docx- pdf - Bilder fehlerhaft (Musterfüllung)
Hallo, ich habe ein Problem beim umwandeln von Word Dokumenten in PDF mit Acrobat X Pro. Ich benutze in Acrobat die Funktion PDF erstellen. Im Word Dokument habe ich Excel Tabellen mit streifiger Musterfüllung (das sind eigentlich ganz feine Streifen
-
hello, I have a question regarding Vendor issued Boletos. The process we have is 1. we recieved NF/invoice from third party [ creates IR and uses payment method 'Vendor issued Boleto' ] 2. We recieve physical Boleto from vendor 3. IR is completed usi
-
Is it possible to deconstruct an existing video to get its component parts?
I made a video http://gallery.mac.com/lorna6#100193 years ago from footage taken in about 2000 and 2001. In a prior thread I mentioned having somehow losing the AUDIO component. Well, disturbingly, I went and watched the video from my old iMovie '06
-
Everything is slowed down after upgrading to ios8 ?
I have various problems after upgrading to IOS8 with mij Ipad2. Pages has for example become very slow. I can say that it has in fact become unusable: I get typing errors caused by the slowness. Another complaint is that the keyboard all the time co
-
Streams AQ: enqueue blocked on low memory
Single instance Standard 10.2.0.1.0 Win 2k3 32 bit. For the past 2 hours, there are spikes of dark brown (Configuration) on the Performance screen in EM every 5 minutes. When I click on Top Activity, I can see that the session belongs to SYS and Prog