Question About BDC Program
What is bdc_okcode? It is the user command that was executed.
eg. '/00' means Enter command.
What is the function key values of BDC_OKCODE
ie '/00' what this is for?
'/00' is generally the BDC_OKCODE for the ENTER key.
Now, regarding the error handling in call transaction.
Following is the psuedocode for one of the methods. LOOP for the internal table IT1 which has data value from flat file. call transcation using....
Read the dictionary table T100 FOR ALL ENTRIES in BDCMSGCOLL.
IF message type is E , then, transfer the contents of
this particular error record to file x. (TRANSFER......)
(You can also store the message text from T100 and the
error record in another internal table IT2)
Please note that the client might ask you for a file of
records which could not be uploaded.
Otherwise just display the error messages and the error
records in the internal table IT2 in the form of a list.
Alternatively, Instead of
Also refer FORMAT_MESSAGES function module. As, I said, there are more than one method of doing this. ABAP Tips by: Satheesh, Jinna 1) How to handle error in bdc call transaction method...without using structure BDCMSGCOLL. Use Std Function module 'FORMAT_MESSAGE' 2) How to load images from application server in bdc Solution: I don't think so. 3) How to insert data in table control through bdc ....problem is every system displays different no of rows in the table control when you enter the application....for ex .. purchase order, pur req, bom.... Solution: Use CALL TRANSACTION 'ME21N' OPTIONS FROM w_ctu_params.( type CTU_PARAMS) This structure contains the follwing. DISMODE : Display mode (like the MODE addition)
DEFSIZE : Use default window size (Here we are handling
those transaction by giving default window size)
The components DEFSIZE , RACOMMIT, NOBINPT, and NOBIEND
always take the following values:
4) Can you give me one example where we should use only bdc call transaction method: Solution: With CALL TRANSACTION USING, the system processes the data more quickly than with batch input sessions. Unlike batch input sessions, CALL TRANSACTION USING does not automatically support interactive correction or logging functions 5) In the reports when you press f4 to get list is it possible to pass default value in that value...i.e suppose i have created select option on company code when the user press f4 automatically he should get the default value. Solution: Ya, It is possible. AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_BUKRS. P_BUKRS-LOW = ‘2000’. With Compliment by: Venkat .O. I want to learn BDC ....how should I go about it so that I make it my strong area......please help. BDC is Batch Data Communication where data is transferred from legacy system to SAP system. Different methods of BDC are 1. Call Transaction Method.
In all the above methods you have to prepare a flat file containing the data in the required format to be uploaded to the SAP system. You need to call the function ' UPLOAD' to do this. Then the contents of the flat file have to copied to your internal table and then u need to call the transaction through which you want to update the database. You internal table should also have the information relating to the structure BDCDATA which is having the details like the module pool program name, screen no. The basic concept of updating the database is same in all the 3 methods but only the method differs. In session method after the data transfer program is coded, in order to process that particular session you have to go to TC: SM 35 to process the session. Direct input method have some standard programs that have to executed..... Well, to be strong you got to try it out.......and check if it works!!! Smitha Q: Our ABAP program is working properly in Foreground. Can I schedule it for background processing on the weekend? A: SAP standard program RSBDCSUB helps you to schedule the job. Create a variant for RSBDCSUB with the BDC session name. Q: How can we send a mail to the user intimating him that his report/BDC is completed in background? A: You can use FUNCTION RS_SEND_MAIL_FOR_SPOOLLIST If UNIX is being used, you may send a report to any internet mail with the following: REPORT ZSNDMAIL. DATA: COMND (200) type c. DATA: RESULT (200) type c occurs 100 with header line. PARAMETERS: FILE (60) type c lower case default '/sapdata/sd_outbound/testmail.dat'. PARAMETERS: SUBJECT (60) type c lower case. PARAMETERS: EMAIL (60) type c lower case. INITIALIZATION. TRANSLATE EMAIL TO LOWER CASE. START-OF-SELECTION. TRANSLATE EMAIL TO LOWER CASE. CONCATENATE 'cat' FILE '| elm -s "' subject '"' email into comnd seperated by space. CALL 'SYSTEM' ID 'COMMAND' FIELD comnd 'TAB' FIELD UNIX_RESULTS-*SYS*. Loop at Results. write: /1 results. endloop end-of-selection.Content Author: Shivanand Patlolla
Get help for your ABAP problems
ABAP Books
BDC Tips and Tricks
ABAP Programming Tips
Best regards,
All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|