USING BDC is advisable in all scenarios ?
hi guys.
can i use BDC for editing customer details.
is it advisable .........though we have bapi and function modules on which scenario we have to adopt BDC...
pls suggest...
Hi,
It is advisable to use BAPIs for upadtion of masters if available....
The following code illustartes the same....there is a field Search term 1 & 2 in Customer master
IF NOT GI_EXEL-SORT1 IS INITIAL.
GI_BAPIAD1VL-SORT1 = GI_EXEL-SORT1.
GI_BAPIAD1VLX-SORT1 = 'X'.
ENDIF.
ENDIF.
IF SORT2 = 'X'.
IF NOT GI_EXEL-SORT2 IS INITIAL.
GI_BAPIAD1VL-SORT2 = GI_EXEL-SORT2 .
GI_BAPIAD1VLX-SORT2 = 'X'.
ENDIF.
ENDIF.
APPEND GI_BAPIAD1VL.
CLEAR GI_BAPIAD1VL.
APPEND GI_BAPIAD1VLX.
CLEAR GI_BAPIAD1VLX.
OBJID = GI_EXEL-KUNNR.
CALL FUNCTION 'BAPI_ADDRESSORG_CHANGE'
EXPORTING
OBJ_TYPE = 'KNA1'
OBJ_ID = OBJID
OBJ_ID_EXT = ' '
CONTEXT = 1
ACCEPT_ERROR = ' '
SAVE_ADDRESS = 'X'
IV_CHECK_ADDRESS = 'X'
IV_TIME_DEPENDENT_COMM_DATA = ' '
IMPORTING
ADDRESS_NUMBER =
TABLES
BAPIAD1VL = GI_BAPIAD1VL
BAPIAD1VL_X = GI_BAPIAD1VLX
RETURN = RETURN
Regards,
ajit.
Similar Messages
-
Is it possible upload data using BDC for creation of Quotation
Dear All ,
Scenario is such that details in teh quotaion is entered in three steps by three departments, weh ave planned that all three departments would work on single excel sheet enter the details over there and when it is ready we will create quotaion by uploading it through BDC,
First of all is it possible to upload the data in quotaion through BDC , Kindly suggest
Regards
SunainaHi Sunaina,
Yes its possible to load the data through BDC.
But I would suggest to go for BAPI instead of BDC.
BAPI_QUOTATION_CREATEFROMDATA Or BAPI_SALESDOCU_CREATEFROMDATA can be used to create a quotation .
Regs.
Sai -
Capture document no after saving a set of data using BDC
Hi All,
Can u give a useful solution for caputuring data in a transaction.the scenario is:-
1.an excel sheet data should be uploaded in a transaction O3URV_SS0 using BDC.----
done with call transaction
2.it will save all the line items associated with a particular header data.----
done
3.after save, it will generate a document no automatically for each header.----
[this no is stored in the table OIUVL_SSTH]
4.now I have 2 capture this doc no and print a message.
for step 4 i have tried with GET PARAMETER ID.But I am unable to get the doc no.
can anyone give me the proper solutin and send me the piece of code.
Thanks.Hi Kalpita,
Hope you are handling the messages in your BDC process using the MESSAGES option in the CALL TRANSACTION. If so, after the CALL Transaction, check the Message table each line, most probably the required Doc.No will be avaible in the message as a component for the success message.
Eg. Document XXXXXXXXX created successfuly ( Here XXXXXXXXX is the doc no. available in the message as a variable )
Hope this will help you.
Regards,
Smart Varghese -
Error while Uploading vendor invoice (f-43) using BDC
Hi All,
I am trying to post vendor invoice using BDC (F-43). The function code for MORE-DATA is ZK, but when i run the program i get an error 'This Function is not possible '.
What might be the reason for this ?
Thanks & Regards,
RadhikaHello,
I believe the error is 8I017.
Please check the following:
1. Goto transaction SM30, view J_1IINDCUS -> Maintain
IMG -> Logistics - General -> Tax on Goods Movements -> India ->
Basic Settings -> Maintain Company Code Settings
2. Create an entry here for your company code.
Test the same scenario for which you got the mentioned error.
I hope this helps.
Lucas Michel -
Error file generation using BDC
Hi .. friends . This is Sudhir . I have a scenario of loading 50 materials using BDC concept (generate session method) with tcode mm01. During loading if we have any faulty materials then they have to be written in a separate flat file (in the location which we specify in our pc). How can it be done? Hope your answers will be helpful for me to proceed further. Expecting for your reply...
With Regards
Sudhir SHi Sudhir,
I had also similar requirement through Call Transaction method, Solution is
We can store all messages occuring during exection of transaction (e.g MM01) in an internal table of type BDCMSGCOLL, so it contains message id, message no and not message description for that u have to pass internal table to a function module MESSAGE_TEXT_BUILD now u can get message description now store this in an internal table.
Pass this internal table to a function module GUI_DOWNLOAD this will create flat file on ur PC based on the location u have given to this function module.
For session method, session log contains the information u can check INCLUDE program BDCRECX1 which will be created during recording, run this program in the debugger mode u will get idea.
Hope this will help u.............. -
I need to know , how to handle partner profile using BDC.
hi all ,
i need to know how to handle the Partner Profile using BDC, i need the basics behind if any one address regarding this it ill be very helpfull for me. i need a detail description for the above.
Thanks a Lot in Advance........
Thanks
senmaar.I need the basic behind , need to know how its works..... And i need to know could you give me a simple scenario so that i can easily understand.
Could anyone Describe the Basics about that.......
Thanks in Advance
Regards ,
Senthil Kumar -
Whwn to use BDC and When to use LSMW
Hi all,
Kindly tell me when to use BDC and when to use LSMW.
Please give me some scenarios, so that I can get a clear idea.
Note : Do not give the difference between BDC and LSMW.
Thanks to all in advance.
Regards,
Rajesh PHi Rajesh,
LSMW is for standard SAP applications and BDC is for customized applications.
Its worth to check the below link. Its already answered by our Community
Diff between LSmw and Bdc
Regards,
Suresh -
I want in LSMW SAME CODING. THIS IS USING BDC CALL TRANSACTION
REPORT ZXX_BDC_PRA NO STANDARD PAGE HEADING LINE-COUNT 20
LINE-SIZE 150 .
Program Name :ZXX_BDC_PRA *
Object Id : *
Develper Name : praveen *
Start Date : 25.06.07 *
Description : uploading flat file to sap system *
*--structure for Data Uploading.
DATA: BEGIN OF IT_STR ,
VKORG LIKE RF02D-VKORG,
VTWEG LIKE RF02D-VTWEG,
SPART LIKE RF02D-SPART,
KTOKD LIKE RF02D-KTOKD,
NAME1 LIKE KNA1-NAME1,
SORTL LIKE KNA1-SORTL,
ORT01 LIKE KNA1-ORT01,
PSTLZ LIKE KNA1-PSTLZ,
LAND1 LIKE KNA1-LAND1,
SPRAS LIKE KNA1-SPRAS,
END OF IT_STR.
*--Internal Table for Data Uploading.
DATA: ITAB LIKE IT_STR OCCURS 0.
*--Internal Table to sucessfull Records.
DATA: ITAB1 LIKE IT_STR OCCURS 0.
*--Internal Table to Store Error Records.
DATA: ITAB2 LIKE STANDARD TABLE OF IT_STR WITH HEADER LINE.
*--Internal Table for Storing the BDC data.
DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
*--Internal Table for storing the messages.
DATA: MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
DATA: COUNT TYPE I VALUE 1,
S VALUE 0, E VALUE 0.
Selection screen *
SELECTION-SCREEN BEGIN OF BLOCK b1
WITH FRAME TITLE TEXT-001.
PARAMETERS: P_FILE TYPE IBIPPARMS-PATH.
SELECTION-SCREEN END OF BLOCK B1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
*functionality to use drill down list
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
IMPORTING
FILE_NAME = P_FILE.
Start-of-selection *
START-OF-SELECTION.
DATA FILENAME TYPE STRING.
FILENAME = P_FILE.
*-- Form to upload flatfile data into the internal table.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = FILENAME
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = ITAB
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.
*--Generating the BDC table for the fields of the internal table.
LOOP AT ITAB INTO IT_STR.
PERFORM BDC_DYNPRO USING 'SAPMF02D' '0107'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RF02D-KTOKD'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'RF02D-VKORG'
IT_STR-VKORG.
PERFORM BDC_FIELD USING 'RF02D-VTWEG'
IT_STR-VTWEG.
PERFORM BDC_FIELD USING 'RF02D-SPART'
IT_STR-SPART.
PERFORM BDC_FIELD USING 'RF02D-KTOKD'
IT_STR-KTOKD.
PERFORM BDC_DYNPRO USING 'SAPMF02D' '0110'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'KNA1-SPRAS'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'KNA1-NAME1'
IT_STR-NAME1.
PERFORM BDC_FIELD USING 'KNA1-SORTL'
IT_STR-SORTL.
PERFORM BDC_FIELD USING 'KNA1-ORT01'
IT_STR-ORT01.
PERFORM BDC_FIELD USING 'KNA1-PSTLZ'
IT_STR-PSTLZ.
PERFORM BDC_FIELD USING 'KNA1-LAND1'
IT_STR-LAND1.
PERFORM BDC_FIELD USING 'KNA1-SPRAS'
IT_STR-SPRAS.
PERFORM BDC_DYNPRO USING 'SAPMF02D' '0120'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'KNA1-TXJCD'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_DYNPRO USING 'SAPMF02D' '0125'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'KNA1-NIELS'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_DYNPRO USING 'SAPMF02D' '0360'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'KNVK-NAMEV(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ENTR'.
PERFORM BDC_DYNPRO USING 'SAPMF02D' '0310'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'KNVV-BEGRU'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_DYNPRO USING 'SAPMF02D' '0324'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'KNVP-PARVW(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ENTR'.
*--Calling the transaction 'Vd01'.
CALL TRANSACTION 'VD01' USING BDCDATA MODE 'N' UPDATE 'S'
MESSAGES INTO MESSTAB.
PERFORM MESSAGES.
REFRESH : BDCDATA, MESSTAB.
ENDLOOP.
END-OF-SELECTION.
*--Populating the Success records internal table.
IF ITAB1[] IS NOT INITIAL.
format color 5.
WRITE: /'SUCCESSFUL RECORDS'.
format color off.
LOOP AT ITAB1 INTO IT_STR.
WRITE:/ IT_STR-VKORG,IT_STR-VTWEG,
IT_STR-SPART,IT_STR-KTOKD,
IT_STR-NAME1,IT_STR-SORTL,
IT_STR-ORT01,
IT_STR-PSTLZ,
IT_STR-LAND1,
IT_STR-SPRAS.
S = S + 1.
ENDLOOP.
REFRESH : ITAB1.
WRITE:/ 'TOTAL RECORDS',S.
ENDIF.
*--Populating the error records internal table.
IF ITAB2[] IS NOT INITIAL.
FORMAT COLOR 3.
WRITE :/ 'ERRORS RECORDS ARE'.
FORMAT COLOR OFF.
LOOP AT ITAB2.
WRITE:/ ITAB2-VKORG,
ITAB2-VTWEG,
ITAB2-SPART,ITAB2-KTOKD,
ITAB2-NAME1,ITAB2-SORTL,
ITAB2-ORT01,
ITAB2-PSTLZ,
ITAB2-LAND1,
ITAB2-SPRAS.
E = E + 1.
ENDLOOP.
REFRESH : ITAB2.
WRITE: / 'TOTAL RECORDS',E.
REFRESH : ITAB2.
ENDIF.
End of Selection *
END-OF-SELECTION.
TOP-OF-PAGE *
TOP-OF-PAGE.
WRITE:/ SY-ULINE.
WRITE:/10 'REPORT ID',21 SY-REPID,35 'USERNAME',46 SY-UNAME,
60 'SYSTEM DATE',70 SY-DATUM,80 'SYSTEM TIME',90 SY-UZEIT,
100 'PAGE NO',108 SY-PAGNO.
WRITE:/ SY-ULINE.
FOrm to Populate the BDC table.
Start new screen *
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM. "BDC_DYNPRO
Insert field *
FORM BDC_FIELD USING FNAM FVAL.
IF FVAL <> SPACE.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDIF.
ENDFORM. "BDC_FIELD
*& Form messages
FORM MESSAGES .
LOOP AT MESSTAB.
IF MESSTAB-MSGTYP = 'I'.
WRITE : / MESSTAB-MSGV1.
ELSEIF
MESSTAB-MSGTYP = 'S'.
INSERT LINES OF ITAB FROM COUNT TO COUNT INTO TABLE ITAB1 .
COUNT = COUNT + 1.
WRITE : / MESSTAB-MSGV1.
ELSEIF
MESSTAB-MSGTYP = 'E'.
INSERT LINES OF ITAB FROM COUNT TO COUNT INTO TABLE ITAB2.
COUNT = COUNT + 1.
WRITE : / MESSTAB-MSGV1.
ENDIF.
ENDLOOP.
ENDFORM. " messagesHi
Go through the doc and do the same using LSMW
BDC is the way to transfer data by writing a batch input program which can use either session or call transaction method.
LSMW used to transfer data without/less code.
What type of data we transfer using LSMW?
LSMW is best suited for transferring master data.
Actually BDC and LSMW are not comparable at all.
for example LSMW itself can use BDC as a way of mass data transfer.
BDC is a mass data transfer technique via screen logic of existing SAP Data entry transactions. It behaves as if you are manually making thousand of entires into sap system as a background job. And that is probably the reason why BAPI's are preffered over BDC's.
On the other hand LSMW is a tool to facilitate DATA migration from other legacy systems ... It contains step by step procedure for data migration.
Like Managing Data Migration Projects , Creating Source Structures , Mapping Source structures wid Target structures , etc etc
LSMW internally might well be using the following techniqes for data transfer..
1. IDOX
2. Direct Input / BDC
4. BAPI's
LSMW is an encapsulated data transfer tool. It can provide the same functionality as BDC infact much more but when coming to techinical perspective most the parameters are encapulated. To listout some of the differences :
LSMW is basicaly designed for a fuctional consultant who do not do much coding but need to explore the fuctionality while BDC is designed for a technical consultant.
LSMW offers different techinque for migrating data: Direct input ,BAPI,Idoc,Batch input recording. While bdc basically uses recording.
LSMW mapping is done by SAP while in BDC we have to do it explicitly .
LSMW is basically for standard SAP application while bdc basically for customized application.
Coding can be done flexibly in BDC when compared to LSMW
1. Maintain Attributes:
Here you have to choose the second option and you can do the recording how this should work. Then assign the same to the Batch Input Recording name.
2. Maintain Source structure:
Create a structure name
3. Maintain Source field:
In this you have to create a structure same as that of the input file
eg: name
age
4. Maintain structure relations:
This will link the structure to the input file.
5. Maintain field mapping and conversion rules:
Here is the place where you can do coding, depending upon the code you have written or assignment you have done the values will get picked up from the file and get processed.
6. Maintain field mapping and conversion rules:
If you have any fixed values you can define here.
7. Specify files:
Specify the input file path and type.
8. Assign files:
This will assign ur file to the Input file
9. Read Data:
This will read ur data from teh file.
10. Dispaly Read Data:
You can see the uploaded data
11. Convert Data
This will convert the data to the corresponding format for processing
12. Display Converted data:
13. Create batch input session
Here this will create a batch input session for processing
14. Run Batch Input session:
By clicking on the session and process the same you can do teh needfu.
http://www.sapbrain.com/TOOLS/LSMW/SAP_LSMW_steps_introduction.html
http://esnips.com/doc/8e732760-5548-44cc-a0bb-5982c9424f17/lsmw_sp.ppt
http://esnips.com/doc/f55fef40-fb82-4e89-9000-88316699c323/Data-Transfer-Using-LSMW.zip
http://esnips.com/doc/1cd73c19-4263-42a4-9d6f-ac5487b0ebcb/LSMW-with-Idocs.ppt
http://esnips.com/doc/ef04c89f-f3a2-473c-beee-6db5bb3dbb0e/LSMW-with-BAPI.ppt
http://esnips.com/doc/7582d072-6663-4388-803b-4b2b94d7f85e/LSMW.pdf
for Long texts Upload
Please take a look at this..
http://help.sap.com/saphelp_erp2005/helpdata/en/e1/c6d30210e6cf4eac7b054a73f8fb1d/frameset.htm
Reward points for useful Answers
Regards
Anji -
Creation of PO using BDC with ME21N - Urgent
Hi All,
My requirement is to create a Purchase Order using BDC. I'm using ME21N for BDC. I did recording and using that recording I wrote a program for BDC. BDC table is populated correctly, but while calling ME21N using call transaction, program is cuming back to the selection screen, without creating PO. And sy-subrc value after call transaction is '0'. Please let me know the problem.
Thanks in Advance.
Siva Sankar.Hi,
Put a break point after the call transaction statement(i.e, put break point on sy-subrc check)
and then check the message table.
if call transaction is suceessfull u will find a success messages in the I_messages table.
Regards,
Sriram -
Change transaction using BDC-problem for large number of lines on screen
Hi All,
I am developing BAPI (using BDC) which creates quality notification in SAP which is entered via front end web application. Structure p_qmsm contain 3 lines of task in notification. The code is as given below. To avoid problem of large no of lines on screen,code lines starting with * is used. This actually for pagedown after entering every 2 lines and creates new line. so that 2 lines always push up on screen and there will not be problem for creating large no of lines on screen
perform bdc_dynpro using 'SAPLIQS0' '7200'.
perform bdc_field using 'BDC_OKCODE' '=10\TAB11'.
LOOP AT p_qmsm INTO wa_qmsm.
*IF wa_qmsm_cntr > 2.
wa_qmsm_cntr = 2.
perform bdc_dynpro using 'SAPLIQS0' '7204'.
perform bdc_field using 'BDC_OKCODE' '=PEND'.
ENDIF.
perform bdc_dynpro using 'SAPLIQS0' '7204'.
perform bdc_field using 'BDC_OKCODE' '/00'.
CONCATENATE 'VIQMSM-QSMNUM(' wa_qmsm_cntr ')' INTO wm_qmsm_qsmnum.
CONCATENATE 'VIQMSM-MNGRP(' wa_qmsm_cntr ')' INTO wm_qmsm_mngrp.
CONCATENATE 'VIQMSM-MNCOD(' wa_qmsm_cntr ')' INTO wm_qmsm_mncod.
CONCATENATE 'VIQMSM-MATXT(' wa_qmsm_cntr ')' INTO wm_qmsm_matxt.
perform bdc_field using wm_qmsm_qsmnum wa_qmsm-qsmnum.
perform bdc_field using wm_qmsm_mngrp wa_qmsm-mngrp.
perform bdc_field using wm_qmsm_mncod wa_qmsm-mncod.
perform bdc_field using wm_qmsm_matxt wa_qmsm-matxt.
wa_qmsm_cntr = wa_qmsm_cntr + 01.
ENDLOOP.
CALL TRANSACTION 'IQS2' USING wt_bdc
MODE 'N' UPDATE 'A' MESSAGES INTO P_MESSTAB.
The same code is used in modify mode also. web application is sending all 3 lines in modify mode even if single line is modified. It is already decided to send all rows back from web application to SAP in same sequence. It is working fine if i comment 5 lines which is starting with *. But in modify mode, how can i ensure that correct row is modified? and how can i achieve problem of large no of lines on screen?Please suggest?Hi yogesh,
how can i ensure that correct row is modified?
1. For this we need to know two things ;
a) the database table in which the entries are already stored
b) the sequence in which they are displayed in the transaction.
2. So before changing any line, we need to compare (the primary key values / important values)
a) as per the database table and as per the incoming data from web application (using bapi)
b) if the match is ok, it means that particular row was not modified, else modified.
how can i achieve problem of large no of lines on screen?
1. For this I am not sure about the transaction and its screen. Manytimes for appending row on the screen,
there is a PLUS + button on the grid toolbar. So for every entry, (inspite of some empty/filled rows already visible on the screen), we should use the + button, and this new row always appears on the top i.e. row number 1.
hope this helps.
regards,
amit m. -
Creating Sales order texts while using BDC session method is not working
Hi All,
I have an existing program which creates sales order using BDC session method.( Actual program uses BAPI to create sales order and in case if any error occurs during creation of sales order BDC session is generated so that user can process it later and i am facing issues in this part of code where it uses BDC)
I wanted to modify this BDC sesion to update the sales order text also. I tried recording VA01 for creationg sales order text unfortunatly it is not capturing the data i am entering in the text fields.
Please suggest if there is any way to create sales order using BDC.
Regards
SheebaHi Madhu,
'=TP_CREATE' is the OK code i am getting for creating TEXTS. But the text entered are not captured in BDC.
Part of BDC program generated for cretaing sales order texts.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'=%_GC 128 22'.
perform bdc_field using 'LV70T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'=TP_CREATE'.
perform bdc_field using 'LV70T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'=%_GC 128 22'.
perform bdc_field using 'LV70T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'=TP_CREATE'.
perform bdc_field using 'LV70T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'/EBACK'.
perform bdc_field using 'LV70T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE'
'=SICH'.
Regards,
Sheeba -
Material Creation Using BDCs.
Hi all,
I have developed a program for Material Creation using BDC.
Material is Being created and that is working well and good.Here i have a Requirement to update the Newly creted material in Ztable.So when i use call transaction mathod,i have written code for updation under the line CALL TRANSACTION.where in iam getting newly creatde material from MARA table,and so it is working perfectly fine..
But our requirement should be sessions method,so when i use sessions method and exeute the program..we face the problem of updation.
the piece of code for updation is updating previously created material.
Literally speaking only the sessions are created ,when the program is executed,material is not created when program is run.Material is only created when the sessions are processed using SM35,
So how should i do here,where should be the updation code written and where will we get the newly created material in sessions method..
Pls Help me in solving this problemhai priyanaka it might be due to configuration problem
bcos manulay also ur gettign this , so just consult ur MM consultant for soem setting
regards
afzal -
Problem with uploading data from excel using BDC for tcode f-02
Hi All,
I am uploading data from excel using BDC for tcode f-02. The problem here is, while recording, the values of some fields are recording twice. I dont know why it's happening so. But if I run my abap program, I have to give those fields twice in my excel sheet. Otherwise data does not upload. But it is not the feasible way. We must give those fields once in excel. Please tell me, how I can solve the issue.
With regards,
Rosaline.Hi,
in BDC each and every action is recording. If your press enter in same screen that also recorded once aging may be this is your case repeating field values will appear. we can solve the problem for repeat fields like below.
suppose in your excel having repeated field X1 X2 X3 the X2 contains repeated field X3 means delete the X3 field.
Now In your itab having X1 and X2 fields. While in the LOOP the ITAB pass the X2 field to repeated the fields.
LOOP at ITAB to WA.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_CURSOR'.
bdcdata_wa-fval = 'RM08M-EBELN'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'INVFO-BLDAT'.
bdcdata_wa-fval = wa-X2." 1st time pass the X2 fields
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'INVFO-BLDAT'.
bdcdata_wa-fval = wa-X2." pass the same value to repeated field
APPEND bdcdata_wa TO bdcdata_tab.
Endloop.
Hope you can understand.
Regards,
Dhina.. -
TSW-Ticket Creation & Actualization using BDC
Hi,
I am using BDC for Ticket creation using transaction O4TEN.
After execution of this BDC, Ticket get created and Saved but it does not actualize ticket even if we click actualize button using BDC.
In real scenario, after ticket creation the status and substatus values should be "C"(Planned) and "6" (Complete) but in this case the status and substatus values are "B"(Checked) and "4"(Positive).
If we create ticket directly using O4TEN then it actualizes ticket properly.
I am not able to find out why BDC is not actualizing tickets.
Any idea?
Regards,
UmeshHi,
I tried BDC for SAVE but still not getting Ticket Key.
So now I am using FM: OIJ_EL_A_TICKETS_MAINTAIN_N.
It creates ticket but in Ticket Item table Ticket item field is blank. Purpose is blank.
Also OIJ_EL_TKT_I_O1 and OIJ_EL_TKT_I_O2 are not populated.
In header I am passing: TICKET_PURPOSE, TICKET_TYPE, UPDKZ = 'I'
and In item I am passing: NOMNR, NOMTK, NOMIT, MENGE, MEINS, TIME_ST_LOAD_STA, TIME_ST_LOAD_END, BUDAT UPDKZ = 'I'.
am I missing something?
Code is as follows:
Replace BDC with function module: OIJ_EL_A_TICKETS_MAINTAIN_N
1) Call FM: OIJ_EL_A_TICKETS_MAINTAIN_N
2) Call FM: ENQUEUE_E_OIJTKT
3) Call FM: OIJB_GENERATE_DOCUMENTS_N
4) Call FM: DEQUEUE_E_OIJTKT
DATA: ls_tkt_h TYPE roij_el_ticket_hvb,
ls_tkt_i TYPE roij_el_ticket_i_io,
ls_oijnomi TYPE oijnomi,
ls_roijnomiio TYPE roijnomiio,
ls_ticket_item TYPE oij_el_ticket_i,
ls_ticket_item_o1 TYPE oij_el_tkt_i_o1,
ls_ticket_item_o2 TYPE oij_el_tkt_i_o2,
ls_ticket_header_pv TYPE oij_el_ticket_h,
ls_ticket_header TYPE oij_el_ticket_h,
ls_tkt_i_o1 TYPE oij_el_tkt_i_o1,
ls_tkt_i_o2 TYPE oij_el_tkt_i_o2.
DATA: lv_time TYPE sy-uzeit.
DATA: it_tkt_i TYPE roij_el_ticket_i_io_t,
it_tkt_h_evt TYPE roijte_t,
it_tkt_h_evt_txt TYPE oij_txt,
it_tkt_i_evt TYPE roijte_t,
it_tkt_i_evt_txt TYPE oij_txt,
it_tkt_i_o1 TYPE roij_el_tkt_i_o1_t,
it_tkt_i_o2 TYPE roij_el_tkt_i_o2_t,
it_tkt_err_log TYPE oij_el_err_log_tt,
it_tkt_doc_flow TYPE roij_el_doc_flow_io_t,
it_return TYPE bapiret2_t,
it_oijnomh TYPE oijnomh_t,
it_oijnomi TYPE oijnomi_t,
it_ticket_item TYPE STANDARD TABLE OF oij_el_ticket_i,
it_ticket_item_o1 TYPE STANDARD TABLE OF oij_el_tkt_i_o1,
it_ticket_item_o2 TYPE STANDARD TABLE OF oij_el_tkt_i_o2.
ls_tkt_h-ticket_purpose = '1'.
ls_tkt_h-ticket_type = lv_ticket_type.
IF lv_ticket_type EQ c_yp2.
If Ticket type is YP2 then
ls_tkt_h-yy_mct_cat = fp_mct_cat.
ENDIF.
ls_tkt_h-yy_pat_alc = lv_alloc_rule.
ls_tkt_h-updkz = 'I'.
ls_tkt_i-nomnr = fp_s_tc1-nomnr.
ls_tkt_i-nomtk = fp_s_tc1-nomtk.
ls_tkt_i-nomit = fp_s_tc1-nomit.
ls_tkt_i-menge = lv_menge.
ls_tkt_i-meins = fp_s_tc1-units.
CLEAR ls_oijnomi.
SELECT SINGLE * FROM oijnomi INTO ls_oijnomi
WHERE nomtk = fp_s_tc1-nomtk
AND nomit = fp_s_tc1-nomit.
IF sy-subrc EQ 0.
MOVE-CORRESPONDING ls_oijnomi TO ls_roijnomiio.
ENDIF.
PERFORM get_timestamp USING fp_sdate
lv_time
ls_roijnomiio
CHANGING ls_tkt_i-time_st_load_sta.
PERFORM get_timestamp USING fp_edate
lv_time
ls_roijnomiio
CHANGING ls_tkt_i-time_st_load_end.
CONCATENATE lv_budat(4) lv_budat5(2) lv_budat8(2) INTO ls_tkt_i-budat.
ls_tkt_i-updkz = 'I'.
APPEND ls_tkt_i TO it_tkt_i.
CALL FUNCTION 'OIJ_EL_A_TICKETS_MAINTAIN_N'
EXPORTING
is_tkt_header = ls_tkt_h
IT_HEADER_EVT =
IT_HEADER_EVT_TXT =
it_items = it_tkt_i
IT_ITM_EVT =
IT_ITM_EVT_TXT =
IT_ITM_O1 =
IT_ITM_O2 =
IT_TKT_ERROR_LOG =
it_tkt_doc_flow = it_tkt_doc_flow
iv_commit = 'X'
IV_LOCK =
IV_ADD_TO_LOG =
IV_CALL_TO_OUTPUT =
IMPORTING
es_tkt_header = ls_tkt_h
ET_HEADER_EVT = it_tkt_h_evt
ET_HEADER_EVT_TXT = it_tkt_h_evt_txt
et_items = it_tkt_i
ET_ITM_EVT = it_tkt_i_evt
ET_ITM_EVT_TXT = it_tkt_i_evt_txt
et_itm_o1 = it_tkt_i_o1
et_itm_o2 = it_tkt_i_o2
ET_TKT_ERROR_LOG = it_tkt_err_log
et_tkt_doc_flow = it_tkt_doc_flow
et_return = it_return
EXCEPTIONS
ticket_locked = 1
OTHERS = 2
IF sy-subrc NE 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
COMMIT WORK AND WAIT.
Lock the ticket
There is no check neccessary if the ticket has already
been locked by an other user because it has just been
created.
CALL FUNCTION 'ENQUEUE_E_OIJTKT'
EXPORTING
mode_oij_el_ticket_h = 'E'
mandt = sy-mandt
ticket_key = ls_tkt_h-ticket_key
ticket_version = ls_tkt_h-ticket_version
ticket_purpose = ls_tkt_h-ticket_purpose
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
CALL FUNCTION 'OIJB_GET_NOMINATION_DATA'
EXPORTING
ACTIVITY =
is_ticket_header = ls_tkt_h
is_ticket_item = ls_tkt_i
IV_ADD_TO_LOG =
CHANGING
ct_oijnomh = it_oijnomh
ct_oijnomi = it_oijnomi
RETURN =
EXCEPTIONS
ticket_data_error = 1
no_nomination_selected = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ls_ticket_header = ls_tkt_h.
LOOP AT it_tkt_i INTO ls_tkt_i.
MOVE-CORRESPONDING ls_tkt_i TO ls_ticket_item.
APPEND ls_ticket_item TO it_ticket_item.
ENDLOOP.
LOOP AT it_tkt_i_o1 INTO ls_tkt_i_o1.
MOVE-CORRESPONDING ls_tkt_i_o1 TO ls_ticket_item_o1.
APPEND ls_ticket_item_o1 TO it_ticket_item_o1.
ENDLOOP.
LOOP AT it_tkt_i_o2 INTO ls_tkt_i_o2.
MOVE-CORRESPONDING ls_tkt_i_o2 TO ls_ticket_item_o2.
APPEND ls_ticket_item_o2 TO it_ticket_item_o2.
ENDLOOP.
CALL FUNCTION 'OIJB_GENERATE_DOCUMENTS_N'
EXPORTING
i_ticket_header = ls_ticket_header
i_ticket_header_pv = ls_ticket_header_pv
I_CLOSE_SHIPMENT = ' '
TABLES
t_ticket_item = it_ticket_item
t_ticket_item_o1 = it_ticket_item_o1
t_ticket_item_o2 = it_ticket_item_o2
T_TICKET_ITEM_PV =
T_TICKET_ITEM_O1_PV =
T_TICKET_ITEM_O2_PV =
t_oijnomh = it_oijnomh
t_oijnomi = it_oijnomi
T_DOC_FLOW =
T_ERR_LOG =
T_REVERSAL_DOCS =
T_ORIGINAL_DOCS =
T_TICKET_SUBITEM =
EXCEPTIONS
error_during_cip_process = 1
error_during_checks = 2
nomination_lock_error = 3
nomination_read_error = 4
cip_process_read_error = 5
OTHERS = 6
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
COMMIT WORK AND WAIT.
ENDIF. -
Problem in uploading material master data using BDC?
Hi all,
I am using BDC call transaction method to upload material data. Here i am facing a problem that a value in the flat file is going to the wrong screen field . But my recording done properly.
In recording, after entering the data in the view BASIC DATA1 and trying to enter the text . For this i need to scroll down the scroll bar and after that i am clicking on basic data text and entering the text. Here i am not touching the languge field.
But the problem is the text to be entered into the basic data text is storing in language and giving error.
Please help me by specifying the reason and solution for this problem? Whether i did any mistake in recording in scrolling?
Thanks,
Vamshi.Hi
Go with BAPI for such huge transactions and screens. Use BAPI: BAPI_MATERIAL_SAVEDATA.
Regards,
Vishwa.
Maybe you are looking for
-
I can not download latest version of adobe flash it quits every time I try to open it.
I can not download latest version of adobe flash it quits every time I try to open it.
-
Workspace Manager download software
Hi! I am trying to download the Oracle Workspace Manager 10g, but I could not find in the Oracle Workspace dowload (for the 10g release)!!! http://www.oracle.com/technology/software/products/workspace_mgr/index.html Please, somebody can help me? Many
-
O2 have gone on record to say that even with three attempts Sony cannot make a decent go of the ICS firmware for 2011 handsets. http://www.coolsmartphone.com/2012/08/31/xperia-arc-ray-and-neo-updates-blocked-by-o2/ Looks like we are out of luck and m
-
Create BPEL jar file using Bpelc via Java classes
HI, I am trying to create the BPEL files ( xyz.bpel, bpel.xml, xyz.wsdl etc.. ) on the fly using Java code... Once I create all these files, I create a packaged jar (Ex : bpel_xyz_v2006_10_17__37256.jar) file and deploy the same in the Bpel PM. Right
-
Will Pro 1.5 work in Windows 7?
Thanks for your help. Setting aside the fact that Pro 1.5 is an "older" version and Windows 7 is not supported. Research has turned up that some versions of Premiere are working in Windows 7, but I haven't found any feed back yet on Pro 1.5. Yes... w