Question related to BDC for XD01
I created a bdc program from the sample recording which I did using xd01. Basically, I am trying to transfer customer records from a text file on my computer to sap using xd01.
The bdc_data text file which I use in the below code contains data of the form:
0005 5120000004 samplename samplesearch chicago 60606 us en
(all are separated by tabs)
I am also attaching the code below. I executed the program and created session, then went to sm35, chose the session and F8 in 'display error' mode. Then I am getting a message for XD01 transaction as #5120000004#SAMP in customer field and error message 'Account number incorrect. please check the entry'. Am I doing anything wrong with the way I wrote those customer records in the text file using tabs? Please help. Thanks.
The code is below:
REPORT Z_XD01_AUGPROGRAM
NO STANDARD PAGE HEADING LINE-SIZE 255.
TABLES: KNA1.
INCLUDE BDCRECX1.
DATA: BEGIN OF BDC_DATA OCCURS 0.
INCLUDE STRUCTURE BDCDATA.
DATA: END OF BDC_DATA.
DATA:
BEGIN OF ITAB OCCURS 0,
KTOKD LIKE RF02D-KTOKD,
KUNNR LIKE RF02D-KUNNR,
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 ITAB.
START-OF-SELECTION.
CLEAR BDC_DATA.
REFRESH BDC_DATA.
PERFORM LOAD_DATA USING 'C:\BDC\BDC_DATA.TXT'.
PERFORM OPEN_GROUP.
LOOP AT ITAB.
PERFORM BDC_DYNPRO USING 'SAPMF02D' '0100'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RF02D-KTOKD'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'RF02D-KTOKD'
ITAB-KTOKD.
PERFORM BDC_FIELD USING 'RF02D-KUNNR'
ITAB-KUNNR.
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'
ITAB-NAME1.
PERFORM BDC_FIELD USING 'KNA1-SORTL'
ITAB-SORTL.
PERFORM BDC_FIELD USING 'KNA1-ORT01'
ITAB-ORT01.
PERFORM BDC_FIELD USING 'KNA1-PSTLZ'
ITAB-PSTLZ.
PERFORM BDC_FIELD USING 'KNA1-LAND1'
ITAB-LAND1.
PERFORM BDC_FIELD USING 'KNA1-SPRAS'
ITAB-SPRAS.
PERFORM BDC_DYNPRO USING 'SAPMF02D' '0120'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'KNA1-TXJCD'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=UPDA'.
PERFORM BDC_TRANSACTION USING 'XD01'.
ENDLOOP.
PERFORM CLOSE_GROUP.
*& Form load_data
text
-->P_0076 text
FORM LOAD_DATA USING VALUE(P_0076).
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'C:\BDC\BDC_DATA.TXT'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = ' '
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
IMPORTING
FILELENGTH =
HEADER =
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
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. " load_data
It is working out pretty well with Anil's suggestion but still there is a minor problem. While transferring records, for each record, it is showing error message just for language (spras) field (remaining all fields are getting updated correctly). The value in the language field says 'e' (even though in the text file it is written correctly as 'en').
Any idea why it is showing error like this even though it is written well in text file?
Yes, srinivas. I seperated each reading in the text file columnwise by tabs and new records come in a different row.
Thanks for your input.
Similar Messages
-
Clarification relating to BDC for MD61 transaction
Hi,
Did any one made any development for MD61 transaction. I am planning to do an BDC for upload of planning data
for the different periods and for different materials. DId any one found any complexities in this development and
how it is suggestible.
I am planning to bring sales quotation data and upload as demand in MD61
Regards
madanHi,
Sales quotations are the proposals & their is not any reference of delivery date that we could take as production finish date i.e material availablity/ promising date in demand manangement.
So, you need to rethink on quotation data & try to fix peiod either month or week or day that could reduce development complexity.
Rgd,
Chetan -
Hi,
I'm trying to create a BDC for ME52 by SHDB transaction. My requirement is to delete Service Items of a specific Purchase Requisition Item.
I've noticed that the behavior of the ME52 by using SHDB is not the same regarding its direct execution. The called screens is different.
Does anyone know why does that happen?
Thanks in advance,
Tiago.Hi,
When SHDB record is created, it's displayed the option "No BI mode". When that option is chosen, the sequence of the necessary screens to delete the service items is run, but the bdc mapping generated is quite strange. FVAL fields are filled with subscreen names only.
When ME52 is executed, the sequence of the screens is: 1) Purchase Requisition Number, 2) Purchase Requisition Items and 3) Service Items. From this one it's only necessary to click on the Button ' - ' to delete the service item. However, when I try to do it by SHDB, The button ' - ' calls another screen.
Any help is welcome.
Thanks in advance.
Tiago. -
hii, friends
i hav two scenarios
one to create new customer with all partner functions having same sold to party,ship to party,bill to party and payer details.
two to create the new customer with multiple ship to party bill to party And payer details.
iam in fix ,plz help me out
all the guidance will be highly appreciated.Refer to this link
xd01
Regds
Manohar -
Basic Questions related EHPs for SEM
Hi Guys,
I've some basic questions related to EHPs: -
1. If we don't mean to implement any of the new functionalities does it make any sense to implement EHP? In other words do EHPs also have some general improments other than the functionalities which can be specifically activated?
2. If we just activate a functionality and don't implement/ use it can there be any negative impact?
3. In case of a pure technical upgrade from SEM 4.0 to SEM 6.0 which EHP would be recommended?
4. Is there a quick way to find all relevant notes in EHPn which are related to corrections for EHPn-1?
Thanks in advance,
-SSCHI,
If you see some of my older posts I have had many issues with certain features of the EHP2 functionality but that doesn't mean I would recommned against it.
BCS 6 EHPs 3 & 4 (BCS 6.03 / 6.04) - enhancement packs worth implementing?
BCS 6 EHP 2 (BCS 6.02) - activation of enhancement pack
My recommendation is to implement the EHPs but not necesarrily activate the functions (in SFW5) unless you need them - this means that you will only have to test once after EHP implementation and will have the ability to activate the other features as and when required (although testing is required after activation of course) whereas it might be difficult to persuade your client/basis team to implement EHP4 later if you don't do it now.
In the features of EHP2 (activate FIN_ACC_GROUP_CLOSE) it states that there is a general performance improvement - although I have yet to experience it! From OSS note 1171344 "The functionality which is available in EHP2 consists of...
... Performance improvements of status management, reporting and initial start-up of consolidation workbench and monitor.
Since activating FIN_ACC_GROUP_CLOSE I have had many OSS notes requiring application but i discovered that when the technical team implemented the EHPs (before i joined this client) they somehow forgot the latest SP (support packs) and didn't upgrade to the current level - so make sure that you get the right SPs too (see the links in Greg's link above) to avoid the many OSS notes.
As for your question - "is there a list of OSS notes to specific to EHP upgrades? - the answer is most definietly "NO" - I already asked OSS in desperation!
however, you can see the OSS notes that i have applied listed in the above link ( BCS 6 EHP 2 (BCS 6.02) - activation of enhancement pack ) -
BDC for deleting vendors at plant level
Hi experts..
I have query regarding BDC. Please read below.
Go to MK02 T-code , select valid combination of vendor and purchase organiation -> select 2 check boxes in general data
-> select 2 check boxes in purchase oraganization data -> press ' Enter ' -> again press ' Enter '-> again press 'Enter '-> select ' Alternative Data ' in Tool bar -> There you will see all the plant descriptions belongs to vendor under purchase oraganization .
Now i have to delete some plants ( based on certain condition ) here,this i can do by selecting plant and press delete line .
This procedure i have to repeat many vendors. i wanted to implement this through BDC .
My question is , through BDC how can i select some plant descriptions ( there in the last screen ) . Dynamically i have to select some plant descriptions .
Thanks much !!!
RadhikaHello dear Srinivas,
I want to inform you that your question is not in the most appropriated spot for the experts. It is related to FI area but was posted in the logistic area.
Please close this thread and open a new one in the following spot (ERP FI)
-SAP ERP Financials
Best Regards,
Christian Rosa -
can someone plz confirm me that how i can change or update the security questions related to my apple id? as i have been never put them since i create my apple id but now due to some security reasons its asking me again and again the answers. i am unable to go through the process. thanks.
Some Solutions for Resetting Forgotten Security Questions: Apple Support Communities
-
Question related to Java Concurrent Program
Hi Friends,
I have a basic question related to Java Concurrent Program in the Oracle application. I would like to know the how Java concurrent program is executed in Oracle applications.Also, want to know where can I find the document for the AOL packages for Java concurrent program. Document for packages like oracle.apps.fnd.cp.request.* , oracle.apps.fnd.util.*.
Please let me know.
-Thanks,
SatyaYou may also check:
Note: 250964.1 - How to Register Sample Java Concurrent Program
https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=250964.1
Note: 186301.1 - How to register and execute Java Concurrent Program ?in Oracle Applications R11i?
https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=186301.1 -
HR ABAP How to Write BDC For Infotype 0586
Hi Experts
Can Any One tell me how to write BDC for Infotype 0586 and also 585.
If we enter into the maintaining Screen, the lines in the Screen will dynamically changing depending on the values.
When I am doing recording , If I press page down after entering values in top lines, the lines are changing and the records are not updating Correctly.
I need to write BDC to Create Change.
Can any one please help me in this regard?
Thanks in Advance.
Regards
Avinash.http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
http://www.google.co.in/search?hl=en&q=SAPBDCtable+control&meta=
http://www.sap-basis-abap.com/abap/handling-table-control-in-bdc.htm
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
http://www.sap-img.com/abap/question-about-bdc-program.htm -
Hi gurus , i am writing a bdc for ca01. here the screen sequence changes when we create routing first time and second or subsequent time. how know that which screen will be next when we are not passing the group, as if counter can be 1 or more than 1 since group is taken automatically.
<<text often considered offensive, removed>>
regards
Aditya.
Edited by: Matt on Mar 9, 2009 12:20 PM - "Urgently" read the Rules of Engagementhi gurus , still my question is not answerd ,
i am writing a bdc for this ca01 , in CA01 transaction when group name is not given the system automatically takes the group.. it can take existing group or create new group. now when new group the group counter is 1 the screen sequence is for eg . 1 , 2 , 3, 4, and when group counter is more than 1 for that group screen sequence is 1 , 2a, 2 , 3 ,4. since the group is internally taken by system we dont know what will be group no ....
pls help how to do this bdc . -
Dear Friends ,
I have developed BDC for FB75 Credit Note . But the GL account which i enters gives warning
"G/L account 430134 is relevant to tax; check code" because of which my recording doesnt go to next page only 4 line items gets uploaded and tht warning keeps coming .
How to overcome the warning .?
Thanks .
SonalHi Sonal,
This error is not related to abap, rather it is functional / based upon configuration.
The GL account you mentioned, requires that some additional field on the screen (tax code) to be filled up.
This field becomes mandatory bcos the configuration is such a way for that particular GL account.
Please contact your functional consultant for help. He will figure out the value for tax code.
Accordingly you may have to change your BDC with ifs and buts.
Regards,
Amit Mittal. -
Questions relating to Groupware Integration (Outlook)
Hello,
I have few questions relating to groupware integration for Outlook:
Q1) The "Relate to CRM" option in outlook add-in for end user is available only in client side integration? Is it not available for server sider integration (i.e. in server side, end user cannot directly assign CRM account or Transaction to object in outlook the way it is done in client side)?
Q2) Is there any end user interface (like add-on) available in server side?
Q3)In client side - Can the outlook add-on for SAPCRM be enhanced for different business logic or look n feel?
Thanks,
VickyHello Vicky,
1) Yes the Relate to SAP CRM function is part of Client-side groupware only.
2) The Add-in is only available with Client-side groupware.
3) The Add-in cannot be customized. However the results can be influenced by parameters in transaction GWIPROFILE.
The information displayed in the Business information Pane can be changed.
Best Regards,
Gervase Auden -
BDC for IE02 Classification Fields
Hi,
I am trying to create BDC for IE02 Equipment change for its Classification fields based on equipment object type.
When i create BDC with IE02 and when i go to the transaction and then Eq Specific TAB the fields become display only and i couldn't enter data.How to record BDC for Eq specific TAB in IE02?
Is that good to update the classification data for IE02 directly with "BAPI_OBJCL_CHANGE". The number of classification fields for each equipment type differs how can that be handled?
Thank you
arunhi Arun,
Did you try changing the equipment using <b>BAPI_EQUI_CHANGE</b> ? There is a structure called <b>DATA_SPECIFIC</b> which is specific for Equipment related data.
For classification related changes, look at the FM's available in transaction <b>BAPI</b>
Cross Application Components -> Classification
Regards,
Subramanian V.
Message was edited by: Subramanian Venkateswaran -
Hi all,
I've created a BDC for transaction KO02 that will add settlement rules to an existing order. Then I'm using the generated code to create a new program. I have two questions.
1. I need to validate against existing settlement rules. Is there a way to get this information, i.e. can I read the existing table somehow?
2. When I enter multiple entries, I noticed the following calls:
perform bdc_dynpro using 'SAPLKOBS' '0130'.
perform bdc_field using 'BDC_CURSOR' 'COBRB-BETRR(01)'.
perform bdc_field using 'BDC_OKCODE' '/00'.
perform bdc_field using 'COBRB-KONTY(01)' XXX'.
perform bdc_field using 'DKOBR-EMPGE(01)' 'XXX'.
perform bdc_field using 'COBRB-BETRR(01)' 'XXX'.
perform bdc_dynpro using 'SAPLKOBS' '0130'.
perform bdc_field using 'BDC_CURSOR' 'COBRB-BETRR(02)'.
perform bdc_field using 'BDC_OKCODE' '/00'.
perform bdc_field using 'COBRB-KONTY(02)' 'XXX'.
perform bdc_field using 'DKOBR-EMPGE(02)' 'XXX'.
perform bdc_field using 'COBRB-BETRR(02)' 'XXX'.
perform bdc_dynpro using 'SAPLKOBS' '0130'.
Do I need to increment those numbers myself? For example, COBRB-KONTY(01) -> COBRB-KONTY(02)?
Thanks!1) COAS - AUFNR
OBJNR -> COBRA-OBJNR, COBRB-OBJNR
as for your 1st question check for the COBRA to see if you can get the existing settlement rules for the order . You have to add more logic to the program for the check.
2) When you go to the Settlement screen on the top on status bar you see a icon for CREATE. Record that in SHDB - Click on it while recording and you can change your program to the program.
Do check BAPI_INTERNALORDER_CREATE
BAPI_INTERNALORDER_SAVEREPLICA helps your requirement. -
Hi Friends,
Can anybody help me for BDC CODE for CO01(Create production order).
This is 1st time i am using BDC for CO01. I don't know how to do recording of CO01.
How many fields are mandatory? Or Anyother way to Create production orde.(Like FM or BAPI)
Thanks And Regards,
AmitAmit,
Here is a trick (you can treat it as method) to know mandatory fields for BDC method.
1. Go to your transaction code, I guess you are working 'co01'.
2. Press 'Enter' on the screen, you would be asked to enter value for a field-enter correct value and then press enter, next you may be asked to enter value for another field....continue until you don't get any error/warning.
3. You will be taken to next/second screen if you were successful entering correct values in the first screen.
4. Mean while, note down those fields that you have filled.
5. Follow above steps until you are done with all screens.
6. Next you can start recording from T.Code 'SHDB'.
Reply to the post if you have any question in the explanation.
Maybe you are looking for
-
Set sales order status is complete after Billing document created
Hi experts: Current Complete rule of item category 'TAN' is space. The Status will be set complete after Delivery document is created. I want to change the rule to the status will be set complete after billing document is created. Han can I do it ??
-
Submit by email for job applications online
I would like to put a job application on my website that people can just fill out and click on "submit" and the submissions will go to my email address. You can do this in Live CycleDesigner but I want to do it with Forms Central. Can someone explain
-
Content-aware-fill and magic-wand-tool
Hello! I use the content-aware-fill to remove some text from a photo. To do so, I use the "Polygonal Lasso Tool", select the text with a generous border and click edit -> fill -> content-aware-fill. This works fine, but selecting a text with the lass
-
ITunes 9.2 won't install correctly. PLEASE HELP
I've been searching for a while now, and I can't find any help for this. I am running Windows 7 (64bit) and I'm trying to install iTunes 9.2 (64bit). Here is a photo of my problem while installing: http://i189.photobucket.com/albums/z25/zacattac318/f
-
Any useful tips for photoshop touch?
Anybody have any useful tips for Adobe Photoshop Touch, it is new to me and I am not 100% with it just yet thanks for reply to my forum