Kindly help reg - LSMW using BAPI
Hi All,
I am using LSMW using BAPI method to upload data to create an Purchase order. I m getting this error.
" Identification specifications missing for source structure 'PSOURCE_HEAD' ".
Here are the steps I have followed.
1. Created an IDOC Inbound Processing.
2. Bussiness Object: BUS2012
Method : CreateFromData
Message Type : PORDCR
Basic Type : PORDCR05
3. Maintained Source Structure : PSOURCE_HEAD AND PSOURCE_ITEM
4. Maintained Source Fields for PSOURCE_HEAD AND ITEM
5. Maintained Structure Relations:
E1PORDCR=>PSOURCE_HEAD
E1BPEKKOC=>PSOURCE_HEAD
E1BPEKOC=>PSOURCE_ITEM
E1BPEKET=>PSOURCE_ITEM
6. MAINTAINED FIELD MAPPING:
E1PORDCR - E1PORDCR-HEAD_ADD_DATA_RELEVANT = 'H'.
E1PORDCR - E1PORDCR-ITEM_ADD_DATA_RELEVANT = 'I'.
7. specify files
8. Assign Files : assigned uploaded file to both PSOURCE_HEAD AND PSOURCE_ITEM
9. IMPORT DATA: I M GETTING THE PROBLEM " Identification specifications missing for source Structure 'PSOURCE_HEAD' ".
H 1001 1000 000
I 100-130 20 200 001 1000 28.06.2006
With Regards
Vasu
Hi vasu
I have encountered the same problem with material BOM creation.
The reason you get this message is probably because you didn't define correctly the identification field in the source structures.
In step 'Maintain source fields' you should define the first field of every structure as identification field by creating char field of length 1. Then from the tree view of source fields, double click this field (in change mode) and give appropriate value in field 'Identifying Field Content', meaning 1 for header structure, 2 for items structure etc.
This should fix the problem.
Best regards
Similar Messages
-
HELP NEEDED *Lsmw using bapi as import method*
Hi,
I am trying a n example implementing lsmw using bapi as inport method for the purchase order data. Here when i am trying to get the data i am getting an error "Ensure field sequence is correct for data for multiple source structures". I have single text file which has both header and the line item data.
IDENTIFIER VENDOR PURCH ORG PURCH GRP
H 100001 0001 001
IDENTIFIER MATERIAL QTY PRICE MATGRP PLANT DELDATE
I A 50 1000 YAS1 20/10/2007
Thank you,
MadhuHi madhu,
check the step where you assign the source structure in the LSMW and check whether it is in accordance with your flat file field sequence. I think that is cause for your error.
Reward points if useful.
Best Regards,
Sekhar -
Class data upload through LSMW using BAPI
Hi All,
Plz tell me how to upload class data through LSMW using BAPI.I also need some study material on BAPI.
Bye,
Mithilesh Tiwariits not possible with single file
for this you need to pass two files of data
1 ) Header data ZSOURCE_LIST_HEADER Source List Header
MATNR C(018) Material Number
Selection Parameter for "Import/
WERKS C(004) Plant
2) item data ZSOURCE_LIST_ITEM Source List Item
MATNR C(018) Material Number
LIFNR C(010) Vendor Number
EKORG C(004) Purchasing Organiz
WERKS C(004) Plant
VDATU C(008) Valid From
BDATU C(008) Valid to
for this use below LSMW IDOC method
Message Type SRCLST Source List
Basic Type SRCLST01 Source List -
Difference between lsmw using BAPI & lsmw using IDOC?
HI everybody
can anybody tell me difference between lsmw using BAPI & lsmw using IDOC?IDocs and BAPI are very different, so it should be easy to choose between them depending on your requirements.
IDOCS
Advantages
System can work even if target system not always online. The IDoc will be created and sending will just continue once you get connected to the other system.
No additional programming required. You just need to set up the configuration.
Disadvantages
Receipt/processing on the target system may not be immediate.
The sending system has no way to know whether the target system actually received what you sent (unless you use ALE).
If there is no SAP standard IDoc available for your requirement, it's harder to create a customized IDoc than a customized BAPI.
BAPIS
Advantages
You can tell if your sending was successful or not
Sending to/processing on the other side is immediate
Easier to create your own BAPI than your own IDoc
Disadvantages
Will only work if you have an active online connection.
Some programming required to call the BAPI.
Others interface methods you might also want to consider are ALE and RFCs. -
Please can anyone send me a snapshot of lsmw using bapi
please can anyone send me a snapshot of lsmw using bapi
pointz wll b rewarded to the person who send a snapshot of the above query in my mail
[email protected]Hi,
Please check these links for step by step including snapshot.
http://esnips.com/doc/ef04c89f-f3a2-473c-beee-6db5bb3dbb0e/LSMW-with-BAPI
http://www.****************/Tutorials/LSMW/BAPIinLSMW/BL1.htm
Regards,
Ferry Lianto -
hi all,
Can any body provide the code to upload purchase order data using bapis in lsmw.urgent pls...
thanks.
assadBAPIs are normally called synchronously in order to get feedback immediately.A synchronous call will only work if the system we want to access is up and running.For some purposes like data transfer, SAP wanted BAPIs to invoke asynchronously so that the calling application could proceed even if the remote system was currently unavailable.
Hence these BAPIs are linked to ALE (Application Linking and Enabling),an asynchronous message passing mechanism with guaranteed delivery.ALE uses Idocs as the containers for messages. Idocs are instances of Idocs types, which in turn are associated ALE message types
SAP has provided a generator which takes a BAPI and generates an appropriate ALE message type and an associated Idoc type.
Data stored in a file by means of the IDoc technique is generally imported in two steps. You can call these steps in LSM Workbench:
Start IDoc creation.
First, the file of the converted data is read. The "information packages" contained are stored in the R/3 database in IDoc format. It is, however, not stored in the database of the corresponding application. The system assigns a number to every IDoc. Then the file of the converted data is deleted.
Start IDoc processing.
The IDocs created in the first step are submitted to the corresponding application program. This application program checks the data and posts it in the applications database, if applicable.
Thanks,
Manjunath MS
"Reward Points if it is useful" -
why we have to create PARTNER PROFILE while using BAPI in LSMW , and what is the correct way to create that
Hi
Partner Profile creation is not linked with LSMW or BAPI
it is linked with ALE,EDI, IDOC
we create partner profiles using WE20 tcode
and we define Inbound, Outbound paramters related to Idoc data transmission
<b>Reward points for useful Answers</b>
Regards
Anji -
hello everybody!!
i want executable code on mm01 with using bapi................
my requirement is upload mm01 data ( no validations)
i want complete code from strach..........
pls help anybody .......Here's the complete code for T-code MM01.
Just a make a text file with relevant data in the program.
REPORT zrs NO STANDARD PAGE HEADING.
*-- Variable declaratins
DATA: fname LIKE rlgrap-filename.
DATA: wa_string(255) TYPE c.
*CONSTANTS: con_tab(2) TYPE c VALUE '09'.
constants: con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB.
TYPES:BEGIN OF t_mat,
matnr(10),
desc(10),
uom(5),
END OF t_mat.
*-- Work area declaration.
DATA : i_mat TYPE TABLE OF t_mat.
DATA: i_mat_temp TYPE TABLE OF t_mat.
DATA : wa_mat TYPE t_mat.
DATA : wa_matstr TYPE t_mat.
INCLUDE bdcrecxx.
START-OF-SELECTION.
CALL FUNCTION 'UPLOAD'
EXPORTING
CODEPAGE = ' '
FILENAME = ' '
filetype = 'DAT'
ITEM = ' '
FILEMASK_MASK = ' '
FILEMASK_TEXT = ' '
FILETYPE_NO_CHANGE = ' '
FILETYPE_NO_CHANGE = ' '
FILEMASK_ALL = ' '
FILETYPE_NO_SHOW = ' '
LINE_EXIT = ' '
USER_FORM = ' '
USER_PROG = ' '
SILENT = 'S'
IMPORTING
FILESIZE =
CANCEL =
ACT_FILENAME =
ACT_FILETYPE =
TABLES
data_tab = i_mat
EXCEPTIONS
conversion_error = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 6
OTHERS = 7.
IF sy-subrc <> 0.
WRITE:/ 'Internal Table not populated.'.
ENDIF.
**--- Name of file inapplication server
fname = 'bdcdata.txt'.
OPEN DATASET fname FOR OUTPUT IN TEXT MODE encoding default. " encoding default not in 4.0b
IF sy-subrc <> 0.
WRITE: / 'Error opening file'.
ENDIF.
**---Transfering data from internal table to dataset
LOOP AT i_mat INTO wa_mat.
TRANSFER wa_mat TO fname.
ENDLOOP.
CLOSE DATASET fname.
CLEAR i_mat.
CLEAR wa_mat.
PERFORM open_group.
**-----Opening dataset for reading
OPEN DATASET fname FOR INPUT IN TEXT MODE encoding default.
Reading the file from application server
DO.
READ DATASET fname INTO wa_string.
IF sy-subrc <> 0.
EXIT.
ENDIF.
SPLIT wa_string AT con_tab INTO TABLE i_mat_temp.
SPLIT wa_string AT con_tab into table i_mat_temp.
LOOP AT i_mat_temp INTO wa_mat.
APPEND wa_mat TO i_mat.
ENDLOOP.
ENDDO.
CLOSE DATASET fname.
LOOP AT i_mat INTO wa_mat.
PERFORM bdc_dynpro USING 'SAPLMGMM' '0060'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RMMG1-MTART'.
PERFORM bdc_field USING 'RMMG1-MATNR'
wa_mat-matnr.
PERFORM bdc_field USING 'RMMG1-MBRSH'
'W'.
PERFORM bdc_field USING 'RMMG1-MTART'
'FERT'.
PERFORM bdc_dynpro USING 'SAPLMGMM' '0070'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MSICHTAUSW-KZSEL(01)'.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(01)'
'X'.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BDC_SUBSCR'
'SAPLMGMM'
& ' 2000TABFRA1'.
PERFORM bdc_field USING 'BDC_SUBSCR'
'SAPLMGD1'
& ' 1002SUB1'.
PERFORM bdc_field USING 'MAKT-MAKTX'
wa_mat-desc.
PERFORM bdc_field USING 'BDC_SUBSCR'
'SAPLMGD1'
& ' 2001SUB2'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARA-MEINS'.
PERFORM bdc_field USING 'MARA-MEINS'
wa_mat-uom.
PERFORM bdc_field USING 'BDC_SUBSCR'
'SAPLMGD1'
& ' 2561SUB3'.
PERFORM bdc_field USING 'BDC_SUBSCR'
'SAPLMGD1'
& ' 2007SUB4'.
PERFORM bdc_field USING 'BDC_SUBSCR'
'SAPLMGD1'
& ' 2005SUB5'.
PERFORM bdc_field USING 'BDC_SUBSCR'
'SAPLMGD1'
& ' 2011SUB6'.
PERFORM bdc_dynpro USING 'SAPLSPO1' '0300'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=YES'.
PERFORM bdc_transaction USING 'MM01'.
REFRESH bdcdata.
ENDLOOP.
PERFORM close_group.
<b>Hope this is helpful, Do reward</b> -
Screen shots of lsmw using bapi and idoc.
hi
can anybody plz send me the step by step lsmw procedure using
bapi and idoc screen shots.
regards
vijayRefer this link... it has step by step procedure with screen shots....
http://www.****************/Tutorials/LSMW/LSMWMainPage.htm
Regards,
Pavan -
Lsmw - using bapi's (file structure)
HI,
I am trying to use LSMW to upload the purchase order using the bapi.
I am using the Business object - BUS2012
Method - CREATEFROMDATA
Message type - PORDCR
Basic type - PORDCR05
In source structure - Posource_head is given and in the lower level
POsource_item is given.
In the maintain source fields,
For POsource_head, following fields are given,
IDENT C(001) Identifier
LIFNR C(010) Vendor
EKORG C(004) Purch. Org
EKGRP C(003) Purchasing group
for Posource_item , following fields are given,
IDENT C(001) Identifier
EMATN C(018) MPn material
NETPR C(011) Net price
MATKL C(009) Material group
WERKS C(004) Plant
DDATE C(010) Delivery date
Mapping also done.
In the excel sheet or notepad, how the fields should be ordered.?
I just need to know the file format which should be specified in the specify file.
can anyone give the fields and length that i should create in the excel file or notepad?
Points will be awarded.
Regardss,
Vinoth.Hi,
Field should be ordered as per the source structure of your own.
In header you can have unique data (strictly) and one more file of item whch will be having correpsonding data for header records.
Length is as per the Data Element.
Reward if useful! -
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 -
In LSMW using BAPI Scenario, how to assign the same file to HEADER and ITEM
Hi,
i got a problem when we are in ASSIGN FILES step how to assign the same file to both HEADER and ITEM Structures?Hi,
When defining the file in specify files step check the option 'Data for Multiple Source Structures'.
Hope it helps.
Thanks,
Mahesh -
Soem help on lsmw using direct input for mm01
hi,
this is to srinivas.i have done all the steps u have given.but at the step...convert data it is showing soem error msg.the error is
sytax error in prgm in include in line 68.for type "C",max length specification of 65535 is allowed.thanx in advance....Hi Praveen,
the steps i was given you is working fine.
i just check the entire process
where did you got error.
I think in 6th step you just create fixes values,Translations & User-defined routines
ans delete all you have done at 6th step then the cursor goes to 7th step.
please let me know any error.
thanks & regards
Sreenivasulu P -
LSMW Cost Center creation using BAPI BUS0012
Hi
I am creating a LSMW using BAPI BUS0012, I have done the setting for inbound Idoc Processing, but when i am clicking on maintain structure relations, i am getting an error No Target structure could be
found
please let me know what to do ?
thanks in advance
LokeshHi
YOu can check http://help.sap.com/saphelp_nw04/helpdata/en/ad/2d54a41d7011d2b42e006094b944c8/frameset.htm
Here you may get a answer to your question.
Cheers,
Hakim -
Hi All,
I am new to LSMW and want a simple tutorial for using LSMW using Idocs and BAPIs. I have found many useful tutorials for Direct Input and Batch Recording. If anyone can give me link or a tutorial for using lsmw with idocs and bapis it will be of great help.
Thanks in advance.
archishHi,
is step by step process .
Step-by-Step Guide for using BAPI in LSMW
Note! The screen prints in this article are from ECC 5.0. They may differ slightly in other versions.
Introduction:
This document details the usage of BAPI in LSMW. We have used the example of migration of the purchase order data into SAP.
Pre-requisites:
It is assumed that the reader of this article has the minimum knowledge required on the Business Object, BAPI, Message Types and IDoc Types.
Step-by-Step Procedure:
Details of the BAPI used in this scenario:
Business Object: BUS2012
Method: CreateFromData
Details of Message Type and Basic IDoc Type:
Message Type: PORDCR
Basic IDoc Type: PORDCR02
Lets have a look at the BAPI first, before proceeding to the LSMW:
1. Go to Transaction BAPI
2. Click on Search Button
3. Enter the value BUS2012 and select Obj.type(Technical Object Name
4. Press ENTER
5. Following screen appears:
6. On the left side of the screen, Expand the PurchaseOrder.
7. Select PurchaseOrder and double-click on the same for details.
Building LSMW using BAPI:
1. Go to Transaction LSMW.
2. Enter the Project, Subproject and Object information and click on CREATE.
3. Enter the descriptions for Project, Subproject and Object as prompted.
4. Now select Settings à IDoc Inbound Processing
5. IDoc Inbound Processing screen appears. Enter the required details as shown below:
6. Click on Activate IDoc Inbound Processing.
7. Click on Yes when prompted for Activate IDoc Inbound?
8. Hit on Back to return to the main screen.
9. Click on Continue (F8). Following Screen appears:
10. Select the Step 1 Maintain Object Attributes and select Execute.
11. Select the radio button Business Object Method and enter the following details:
Business Object: BUS2012
Method: CreateFromData
Hit ENTER
12. Save and click on BACK button. Following information message is displayed.
13. Now select step 2 Maintain Source Structures and click Execute.
14. In this step, we need to maintain the source structure. In our example, lets consider the example of a file with 2 structures Head and Item data as shown below:
Click on Create and name the source structure as HEADERDATA. Now select HEADERDATA and click on Create again to create the child structure. Following popup appears:
Select Lower Level and click on Continue. Enter the Item data structure name.
Click Save and hit BACK button to go to the main screen.
15. Select step 3 Maintain Source Fields and hit execute.
16. Enter the fields as shown below:
17. Click SAVE and return to main screen.
18. Select step 4 Maintain Structure Relations and click Execute.
Select E1PORDCR and click on CREATE RelationShip. Following screen appears:
Select HEADERDATA and hit ENTER
Similarly do the same for the structure E1BPEKKOA, E1BPEKPOC and E1BPPEKET.
Click Save and return to main screen.
19. Select the step Maintain Field Mapping and Conversion Rules and click on execute. Maintain the Field Mapping as seen below:
20. Select step 7 Maintain Source Files and provide the link for the test file created. (Create a test file with the same structure as defined earlier).
Save and return to main screen.
21. Select the step Assign Files and click on Execute.
Assign the file provided to the source structure. Here the same file is provided for both the structures.
Save and return to the main screen.
22. Select the step Read Data and click on Execute.
Click on Execute.
Return to the main screen.
23. Select the step Display read data and click on execute.
Click on the structure name to get the field level values.
24. Return to main screen and now select Convert Data.
25. Return to the main screen and select Display Converted data.
26. Return to main screen and select Start IDoc generation.
27. Now select the step Start IDoc Processing on the main screen.
28. Return to main screen and click on Create IDoc overview. Here the data record and status records of the IDoc could be viewed:
Please Go through these Links ,
BAPI with LSMW
http://esnips.com/doc/ef04c89f-f3a2-473c-beee-6db5bb3dbb0e/LSMW-with-BAPI
For document on using BAPI with LSMW, I suggest you to visit:
http://www.****************/Tutorials/LSMW/BAPIinLSMW/BL1.htm
http://myweb.dal.ca/hchinni/sap/lsmw_home.htm
http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf
lsmw-idoc method:
http://www.scmexpertonline.com/downloads/SCM_LSMW_StepsOnWeb.doc
Regards
Maybe you are looking for
-
Username and password for iSQLPLUS
The username and password combination I used for SQLPLUS does not work for iSQLPLUS. Why? how to fix it? I'm using 10g database. Any body can help? Thank you Alex
-
Dynamic/Static and Accessibility
Hi, Firstly, I apologize if I've posted in the wrong forum. I have two pdf's created by LiveCycle. One is static which supports accessibility and one is dynamic which does not. My question is, is there a way to get a dynamic pdf to support accessib
-
Working with Application Service
hi i have been working CAF some time , and iam facing problem when iam working with Application Service in CAF , while using the entity service CURD operations in the Application serv
-
Getting rid of music redundancies
When I imported all music files from various external drives into my new macbook pro, the result (due, I'm afraid, to a complete lack of organization on my part), was that almost every song has at least one copy, many have several. Is there a simple
-
I have the MacBook Pro (retina, 13 inch, Mid 2014) Memoria 8GB 1600 MHz DDR3 and I want to increase the memory. What kind of memory do I have to buy?