FI Module Tcodes for BDC
Hi SAP ABAP gurus,
Can you please pass few transaction codes in FI (Finance) module for which we can write BDCs.
Plz urgent.
Thanks,
Vinay
Thank you very much.
Yes though it is difficult to write BDCs , we can you Stnd BAPIs or we can try SHDB to write BDC.
What i am trying to ask is where are the most chances for which transaction codes in FI we might need BDC or BAPI to create data.
Like we ave GL master data, Cost center master data or some transaction data
we need either BAPI or BDC or some stnd prgs.
My question is What are the transaction codes for which there might be a chance to upload or create doc using any BDC or BAPI or infact using any stnd procedure.
Thanks in advance.
Vinay.
Similar Messages
-
What is the tcode for bdc recording and how to do in hr-abap for pa and om
hi,
I need to do the bdc recording for pa and om. So, can any of you tell me how to do and what are the tcodes we have to use.
thanks & regards,
Sekhar.Hi ,
Here is the link from you will get all the transaction code
http://www.sap-basis-abap.com/saphr004.htm
As far PA specfic some tcodes are given below
PA20 Display HR Master Data
PA30 Maintain HR Master Data
PA40 Personnel Actions
PA41 Correct Actions
PA42 Fast Entry for Actions
PA46 Import from Resumix
PA47 Export to Resumix
PA48 Hiring from non-SAP system
PA51 Display Time Data
PA53 Display Time Data
PA61 Maintain Time Data
PA62 List Entry of Additional Data
PA63 Maintain Time Data
PA64 Calendar Entry
PA70 Fast Entry
PA71 Fast Entry of Time Data
PA88 Benefits
For OM specific
PP01 Maintain Plan Data (menu-guided) -
Recording TCode for BDC program
Hi ALL,
I have a problem in recording GS01 tcode.
I have to a table control in GS01 tcode.
After some rows again i need to update the data.
How can i record this and write BDC program for the same.Hi
To uplaod the data using the table control,if number of line are more then screen.
Then use the P+ in u r code.
let assume that u can see 10 rows on screen.once the count reachs the 10 then do P+ then
new line will come and after P+ clear u r counter. -
Give some pp module tcodes used in bdc and their purposes
give some pp module tcodes used in bdc and their purposes
thank you,
Regards,
Jagrut Bharatkumar ShuklaHi
Important PP tables are..
Master Data:
CRHD Work center header
MAPL Allocation of task lists to materials
PLAS Task list - selection of operations/activities
PLFH Task list - production resources/tools
PLFL Task list - sequences
PLKO Task list - header
PLKZ Task list: main header
PLPH Phases / suboperations
PLPO Task list operation / activity
PLPR Log collector for tasklists
PLMZ Allocation of BOM - items to operations
Production Orders:
STKO BOM - header
STPO BOM - item
STAS BOMs - Item Selection
STPN BOMs - follow-up control
STPU BOM - sub-item
STZU Permanent BOM data
PLMZ Allocation of BOM - items to operations
MAST Material to BOM link
KDST Sales order to BOM link
AUFK Production order headers
AFIH Maintenance order header
AUFM Goods movement for prod. order
AFKO Order header data PP orders
AFPO Order item
RESB Order componenten
AFRU Order completion confirmations
Planned orders and Independent requirements:
PLAF Planned orders
RESB Material reservations
PBIM Independent requirements for material
PBED Independent requirement data
PBHI Independent requirement history
PBIV Independent requirement index
RKPF header
Capacity Planning:
KBKO Header record for capacity requirements
KBED Capacity requirements records
KBEZ Add. data for table KBED (for indiv. capacities/splits)
Important Transcation:
CA usually reserved for routing type transactions. This includes reference rate routings and rate routings.
CA31, CA32, CA33: Reference Rate Routing Creationg
CA21, CA22, CA23: Rate Routing Creationg
CA63, CA64 Change documents for Routings
CA80, CA85, CA90, CA95, CA98: Where Used, Replacing Routings, etc.
CR Usually reserved for work center type transactions.
CR01, CR02, CR03: Work Center Creation
CR05, CR07, etc. Work Centers analysis, etc.
CS Usually reserved for BOM type transactions.
CS01, CS02, CS03 Bill of Materials
CS07, CS08, CS09: Extend Bill of materials
CS11, CS12, CS13: Explode Bill of materials
F Usually reserved for financial type transactions
A Usually reserved for financial type transactions.
LM Label Management type transactions
MB Usually reserved for inventory type transactions
MB51 Material document history
MB1A Goods Issue for Scrap
MB1B Goods transfer
MD Usually reserved for MRP type transactions
MD01, MD02, MD03, MDBT - MRP Run
MD04, MD07: Stock/Requirements List
MD05, MD06: MRP List (static)
MD11, MD12, MD13, MD16: Planned Order creation, etc
MD20, MD21: Planning file
ME Usually reserved for Purchasing Type Transactions
ME01, ME03, ME05 Source Lists
ME11, ME12, ME13 Info Records
ME21N, ME22N, ME23N: Purchase Order creation
ME31L, ME32L, ME33L: Scheduling Agreement Creation
ME51, ME57 Purchase Requisitions
ME38, ME38: Schedule Line display
ME37: Stock Transport Scheduling Agreements
ME27: Stock Transport Orders
MM Usually reserved for material master type transactions:
MM01, MM02, MM03: Material Master Creation
MM04 Change Documents
MM06: Mark for Deletion
MM60: Materials List
V Usually reserved for Sales and Distribution type transactions
VA Sales Orders
VL Deliveries
VT Shipments
VD Customer Master for Sales
VK Condition Records
http://www.sap-img.com/sap-pp.htm
http://www.erpgenie.com/sapfunc/pp.htm
Reward if usefull -
What is the Tcodes for Uploading of data using BDC & CATT
PP members:
I was going through the <b>cutover activities</b> , and what I understood is we transfer all the legacy system data into SAP before going live
The data upload follows certain steps (depends on the organizational design load strategies)
First we upload all the master data ( material master, BOM, W/C's & Routings)
Then the transaction data ( Ideally speaking, there should no open orders i.e. WIP as on the day of cutoff )
If the WIP (Work in Process) is unavoidable then the materials consumed shall be treated as <b>materials of the previous stage</b> and necessary adjustments shall be made after cutover day
At this point, I could not able to understand what does the author mean <b>materials of the previous stage</b>
Now comming to the uploading of data into SAP from legacy system, we use tools like LSMW, CATT & BDC
Is it a must to use <b>only LSMW tool</b> to upload master data or any other upload tools are fine
Lastly,. I am not sure about the Tcode of CATT & BDC
Summary of the questions:
1.What does the author mean <b>material of previous stage</b>, for WIP materials during cutover activities
2. Is it mandatory to use only LSMW tool for uploading for master data
3. What are the Tcodes for upload tools CATT & BDC ?
Thanks for your time
Suren RDear,
1.What does the author mean material of previous stage, for WIP materials during cutover activities - as i understood, what is the stage of material..like it must have gone through 2 work centers and other 2 is left. i.e. you need to create Production order with only 2 operation as other 2 is already over. - usually it is done in such a way that we will create Production order and confirm till 2 operations and WIp is calculated so thatb FI will tally the books in SAP and lagacy.
2. Is it mandatory to use only LSMW tool for uploading for master data - no you can use any tool as required and suits yr requirement
3. What are the Tcodes for upload tools CATT & BDC- BDC through a prog in SE38. CATT through - SCEM. -
Function module exits for Tcode MD11.
Please tell me, Function module exits for Tcode MD11.
Reg .
PrajuHi
LMDR2001
LMDZU001
Try out these exits.
Check the folloing BADI's
MD_PLDORD_SCHEDULING
MD_PIR_FLEX_CONS
MD_PLDORD_SCHEDULING
Regards
Divya -
Creating tcode for function module
Hi all
I have created a screen in the funcion group.Now my problem is I have a requirement that I have to keep this screen inside a function group and I also must create a transaction code for this screen so that the user can see only that screen using this tcode whenever he want.Will you please help me to solve this problem.
Thanks in advance.
Regards
Giri.Hi Giri,
U can create Tcode for Program only i.e for report or module pool program.
So keep ur Function inside ur program and create Tcode for that
se93>tcode name> create
reward if it useful.... -
Tcode for the execution of function module
Hi!
A very simple question:
What is the Tcode for the execution of function module? (Se38,???)
I have to execute the function module RRSI_INITIAL_LINE_INSERT with import parameter I_CHABASNM = 0REQUID.
Thank you very much!
regards
Thomhi,
You create new or edit Fm in SE37. You also put the code for that FM in SE37.
You can call it through pattern button in SE38, where u pass the importing and exporting parameters of that Fm
Hope this helps, Do rewad. -
WANT THE TCODE FOR SMART FORMS AND SCRIPTS IN FI MODULE?
HI SHAREHOLDERS OF SAP,
I WANT TO KNOW THE TRANSACTION CODES FOR SCRIPTS AND SMARTFORMS RELATED TO FI MODULE.
WE ARE GOING THROUGH UP GRADATION PROJECT.SO I NEED THE TCODE FOR OBSOLETED TCODE FOR SCRIPTS TO SMARTFORMS IN FI.Hi Arun Kumar,
Generally we do changes in SE71 itself for any forms
but the forms of FI module, we assign in SPRO.
Goto SPRO there click on Display SAP Reference IMG push button or (F5) .
Now search for FORMS. Give the Search term as FORMS and press enter.
Here u get the hit list for FORMS related to all the functional modules. select the FI related forms and double click on it. Then u get the dropdown where the forms are located.
Foe Example here is a path for Assign payment forms for payment method in company code
In SPRO --->Display IMG
Financial Accounting---> Accounts Receivable and Accounts Payable ---> Business Transactions ---> Outgoing payments ---> Automatic outgoing payments ---> Payment media -> Make Setting for Classic Payment Medium Programs-> Assign payment forms for payment method in company codes
EXECUTE Assign payment forms for payment method in company codes
Here u can see all the formS related to the Payment Advice.
Hope this helps...
Best regards,
raam -
Please provide me material for bdc
Hi everyone,
can you please provide me some stuff for bdc, actually i am working on bdc for mm01 , so plz send me study materials and if you have any scenario then please forward me.
Thanks & Regards,
Vimarsh B.Hi
Hope it will help you.
Reward if help.
BATCH DATA COMMUNICATION
About Data Transfer In R/3 System
When a company decides to implement the SAP R/3 to manage business-critical data, it usually does not start from a no-data situation. Normally, a SAP R/3 project comes into replace or complement existing application.
In the process of replacing current applications and transferring application data, two situations might occur:
u2022 The first is when application data to be replaced is transferred at once, and only once.
u2022 The second situation is to transfer data periodically from external systems to SAP and vice versa.
u2022 There is a period of time when information has to be transferred from existing application, to SAP R/3, and often this process will be repetitive.
The SAP system offers two primary methods for transferring data into SAP systems. From non-SAP systems or legacy system. These two methods are collectively called u201Cbatch inputu201D or u201Cbatch data communicationu201D.
1. SESSION METHOD
2. CALL TRANSACTION
3. DIRECT INPUT
Advantages offered by BATCH INPUT method:
1. Can process large data volumes in batch.
2. Can be planned and submitted in the background.
3. No manual interaction is required when data is transferred.
4. Data integrity is maintained as whatever data is transferred to the table is through transaction. Hence batch input data is submitted to all the checks and validations.
To implement one of the supported data transfers, you must often write the program that exports the data from your non-SAP system. This program, known as a u201Cdata transferu201D program must map the data from the external system into the data structure required by the SAP batch input program.
The batch input program must build all of the input to execute the SAP transaction.
Two main steps are required:
u2022 To build an internal table containing every screen and every field to be filled in during the execution of an SAP transaction.
u2022 To pass the table to SAP for processing.
Prerequisite for Data Transfer Program
Writing a Data Transfer Program involves following prerequisites:
Analyzing data from local file
Analyzing transaction
Analyzing transaction involves following steps:
u2022 The transaction code, if you do not already know it.
u2022 Which fields require input i.e., mandatory.
u2022 Which fields can you allow to default to standard values.
u2022 The names, types, and lengths of the fields that are used by a transaction.
u2022 Screen number and Name of module pool program behind a particular transaction.
To analyze a transaction::
u2022 Start the transaction by menu or by entering the transaction code in the command box.
(You can determine the transaction name by choosing System u2013 Status.)
u2022 Step through the transaction, entering the data will be required for processing your batch input data.
u2022 On each screen, note the program name and screen (dynpro) number.
(dynpro = dyn + pro. Dyn = screen, pro = number)
u2022 Display these by choosing System u2013 Status. The relevant fields are Program (dynpro) and Dynpro number. If pop-up windows occur during execution, you can get the program name and screen number by pressing F1 on any field or button on the screen.
The technical info pop-up shows not only the field information but also the program and screen.
u2022 For each field, check box, and radio button on each screen, press F1 (help) and then choose Technical Info.
Note the following information:
- The field name for batch input, which youu2019ll find in its own box.
- The length and data type of the field. You can display this information by double clicking on the Data Element field.
u2022 Find out the identification code for each function (button or menu) that you must execute to process the batch-input data (or to go to new screen).
Place the cursor on the button or menu entry while holding down the left mouse button. Then press F1.
In the pop-up window that follows, choose Technical info and note the code that is shown in the Function field.
You can also run any function that is assigned to a function key by way of the function key number. To display the list of available function keys, click on the right mouse button. Note the key number that is assigned to the functions you want to run.
Once you have program name, screen number, field name (screen field name), you can start writing.
DATA TRANSFER program.
Declaring internal table
First Integral Table similar to structure like local file.
Declaring internal table like BDCDATA
The data from internal table is not transferred directly to database table, it has to go through transaction. You need to pass data to particular screen and to particular screen-field. Data is passed to transaction in particular format, hence there is a need for batch input structure.
The batch input structure stores the data that is to be entered into SAP system and the actions that are necessary to process the data. The batch input structure is used by all of the batch input methods. You can use the same structure for all types of batch input, regardless of whether you are creating a session in the batch input queue or using CALL TRANSACTION.
This structure is BDCDATA, which can contain the batch input data for only a single run of a transaction. The typical processing loop in a program is as follows:
u2022 Create a BDCDATA structure
u2022 Write the structure out to a session or process it with CALL TRANSACTION USING; and then
u2022 Create a BDCDATA structure for the next transaction that is to be processed.
Within a BDCDATA structure, organize the data of screens in a transaction. Each screen that is processed in the course of a transaction must be identified with a BDCDATA record. This record uses the Program, Dynpro, and Dynbegin fields of the structure.
The screen identifier record is followed by a separate BDCDATA record for each value, to be entered into a field. These records use the FNAM and FVAL fields of the BDCDATA structure. Values to be entered in a field can be any of the following:
u2022 Data that is entered into screen fields.
u2022 Function codes that are entered into the command field. Such function codes execute functions in a transaction, such as Save or Enter.
The BDCDATA structure contains the following fields:
u2022 PROGRAM: Name of module pool program associated with the screen. Set this field only for the first record for the screen.
u2022 DYNPRO: Screen Number. Set this field only in the first record for the screen.
u2022 DYNBEGIN: Indicates the first record for the screen. Set this field to X, only for the first record for the screen. (Reset to u2018 u2018 (blank) for all other records.)
u2022 FNAM: Field Name. The FNAM field is not case-sensitive.
u2022 FVAL: Value for the field named in FNAM. The FVAL field is case-sensitive. Values assigned to this field are always padded on the right, if they are less than 132 characters. Values must be in character format.
Transferring data from local file to internal table
Data is uploaded to internal table by UPLOAD of WS_UPLOAD function.
Population of BDCDATA
For each record of internal table, you need to populate Internal table, which is similar to BDCDATA structure.
All these five initial steps are necessary for any type of BDC interface.
DATA TRANSFER program can call SESSION METHOD or CALL TRANSACTION. The initial steps for both the methods are same.
First step for both the methods is to upload the data to internal table. From Internal Table, the data is transferred to database table by two ways i.e., Session method and Call transaction.
SESSION METHOD
About Session method
In this method you transfer data from internal table to database table through sessions.
In this method, an ABAP/4 program reads the external data that is to be entered in the SAP System and stores the data in session. A session stores the actions that are required to enter your data using normal SAP transaction i.e., Data is transferred to session which in turn transfers data to database table.
Session is intermediate step between internal table and database table. Data along with its action is stored in session i.e., data for screen fields, to which screen it is passed, the program name behind it, and how the next screen is processed.
When the program has finished generating the session, you can run the session to execute the SAP transactions in it. You can either explicitly start and monitor a session or have the session run in the background processing system.
Unless session is processed, the data is not transferred to database table.
BDC_OPEN_GROUP
You create the session through program by BDC_OPEN_GROUP function.
Parameters to this function are:
u2022 User Name: User name
u2022 Group: Name of the session
u2022 Lock Date: The date on which you want to process the session.
u2022 Keep: This parameter is passed as u2018Xu2019 when you want to retain session after
processing it or u2018 u2018 to delete it after processing.
BDC_INSERT
This function creates the session & data is transferred to Session.
Parameters to this function are:
u2022 Tcode: Transaction Name
u2022 Dynprotab: BDC Data
BDC_CLOSE_GROUP
This function closes the BDC Group. No Parameters.
Some additional information for session processing
When the session is generated using the KEEP option within the BDC_OPEN_GROUP, the system always keeps the sessions in the queue, whether it has been processed successfully or not.
However, if the session is processed, you have to delete it manually. When session processing is completed successfully while KEEP option was not set, it will be removed automatically from the session queue. Log is not removed for that session.
If the batch-input session is terminated with errors, then it appears in the list of INCORRECT session and it can be processed again. To correct incorrect session, you can analyze the session. The Analysis function allows to determine which screen and value has produced the error. If you find small errors in data, you can correct them interactively, otherwise you need to modify batch input program, which has generated the session or many times even the data file.
CALL TRANSACTION
About CALL TRANSACTION
A technique similar to SESSION method, while batch input is a two-step procedure, Call Transaction does both steps online, one after the other. In this method, you call a transaction from your program by
Call transaction <tcode> using <BDCTAB>
Mode <A/N/E>
Update <S/A>
Messages into <MSGTAB>.
Parameter u2013 1 is transaction code.
Parameter u2013 2 is name of BDCTAB table.
Parameter u2013 3 here you are specifying mode in which you execute transaction
A is all screen mode. All the screen of transaction are displayed.
N is no screen mode. No screen is displayed when you execute the transaction.
E is error screen. Only those screens are displayed wherein you have error record.
Parameter u2013 4 here you are specifying update type by which database table is updated.
S is for Synchronous update in which if you change data of one table then all the related Tables gets updated. And sy-subrc is returned i.e., sy-subrc is returned for once and all.
A is for Asynchronous update. When you change data of one table, the sy-subrc is returned. And then updating of other affected tables takes place. So if system fails to update other tables, still sy-subrc returned is 0 (i.e., when first table gets updated).
Parameter u2013 5 when you update database table, operation is either successful or unsuccessful or operation is successful with some warning. These messages are stored in internal table, which you specify along with MESSAGE statement. This internal table should be declared like BDCMSGCOLL, a structure available in ABAP/4. It contains the following fields:
1. Tcode: Transaction code
2. Dyname: Batch point module name
3. Dynumb: Batch input Dyn number
4. Msgtyp: Batch input message type (A/E/W/I/S)
5. Msgspra: Batch input Lang, id of message
6. Msgid: Message id
7. MsgvN: Message variables (N = 1 - 4)
For each entry, which is updated in database, table message is available in BDCMSGCOLL. As BDCMSGCOLL is structure, you need to declare a internal table which can contain multiple records (unlike structure).
Steps for CALL TRANSACTION method
1. Internal table for the data (structure similar to your local file)
2. BDCTAB like BDCDATA
3. UPLOAD or WS_UPLOAD function to upload the data from local file to itab. (Considering file is local file)
4. Loop at itab.
Populate BDCTAB table.
Call transaction <tcode> using <BDCTAB>
Mode <A/N/E>
Update <S/A>.
Refresh BDCTAB.
Endloop.
(To populate BDCTAB, You need to transfer each and every field)
The major differences between Session method and Call transaction are as follows:
SESSION METHOD CALL TRANSACTION
1. Data is not updated in database table unless Session is processed. Immediate updation in database table.
2. No sy-subrc is returned. Sy-subrc is returned.
3. Error log is created for error records. Errors need to be handled explicitly
4. Updation in database table is always synchronous Updation in database table can be synchronous Or Asynchronous.
Error Handling in CALL TRANSACTION
When Session Method updates the records in database table, error records are stored in the log file. In Call transaction there is no such log file available and error record is lost unless handled. Usually you need to give report of all the error records i.e., records which are not inserted or updated in the database table. This can be done by the following method:
Steps for the error handling in CALL TRANSACTION
1. Internal table for the data (structure similar to your local file)
2. BDCTAB like BDCDATA
3. Internal table BDCMSG like BDCMSGCOLL
4. Internal table similar to Ist internal table
(Third and fourth steps are for error handling)
5. UPLOAD or WS_UPLOAD function to upload the data from the local file to itab. (Considering file is local file)
6. Loop at itab.
Populate BDCTAB table.
Call transaction <tr.code> using <Bdctab>
Mode <A/N/E>
Update <S/A>
Messages <BDCMSG>.
Perform check.
Refresh BDCTAB.
Endloop.
7 Form check.
IF sy-subrc <> 0. (Call transaction returns the sy-subrc if updating is not successful).
Call function Format_message.
(This function is called to store the message given by system and to display it along with record)
Append itab2.
Display the record and message.
DIRECT INPUT
About Direct Input
In contrast to batch input, this technique does not create sessions, but stores the data directly. It does not simulate the online transaction. To enter the data into the corresponding database tables directly, the system calls a number of function modules that execute any necessary checks. In case of errors, the direct input technique provides a restart mechanism. However, to be able to activate the restart mechanism, direct input programs must be executed in the background only. Direct input checks the data thoroughly and then updates the database directly.
You can start a Direct Input program in two ways;
Start the program directly
This is the quickest way to see if the program works with your flat file. This option is possible with all direct input programs. If the program ends abnormally, you will not have any logs telling you what has or has not been posted. To minimize the chance of this happening, always use the check file option for the first run with your flat file. This allows you to detect format errors before transfer.
Starting the program via the DI administration transaction
This transaction restarts the processing, if the data transfer program aborts. Since DI document are immediately posted into the SAP D/B, the restart option prevents the duplicate document posting that occurs during a program restart (i.e., without adjusting your flat file).
Direct input is usually done for standard data like material master, FI accounting document, SD sales order and Classification for which SAP has provided standard programs.
First time you work with the Direct Input administration program, you will need to do some preparation before you can transfer data:
- Create variant
- Define job
- Start job
- Restart job
Common batch input errors
- The batch input BDCDATA structure tries to assign values to fields which do not exist in the current transaction screen.
- The screen in the BDCDATA structure does not match the right sequence, or an intermediate screen is missing.
- On exceptional occasions, the logic flow of batch input session does not exactly match that of manual online processing. Testing the sessions online can discover by this.
- The BDCDATA structure contains fields, which are longer than the actual definition.
- Authorization problems.
RECORDING A BATCH INPUT
A B recording allows you to record a R/3 transaction and generate a program that contains all screens and field information in the required BDC-DATA format.
You can either use SHDB transaction for recording or
SYSTEM ? SERVICES ? BATCH INPUT ? EDIT
And from here click recording.
Enter name for the recording.
(Dates are optional)
Click recording.
Enter transaction code.
Enter.
Click Save button.
You finally come to a screen where, you have all the information for each screen including BDC_OKCODE.
u2022 Click Get Transaction.
u2022 Return to BI.
u2022 Click overview.
u2022 Position the cursor on the just recorded entry and click generate program.
u2022 Enter program name.
u2022 Click enter
The program is generated for the particular transaction.
BACKGROUND PROCESSING
Need for Background processing
When a large volume of data is involved, usually all batch inputs are done in background.
The R/3 system includes functions that allow users to work non-interactively or offline. The background processing systems handle these functions.
Non-interactively means that instead of executing the ABAP/4 programs and waiting for an answer, user can submit those programs for execution at a more convenient planned time.
There are several reasons to submit programs for background execution.
u2022 The maximum time allowed for online execution should not exceed 300 seconds. User gets TIMEOUT error and an aborted transaction, if time for execution exceeds 300 seconds. To avoid these types of error, you can submit jobs for background processing.
u2022 You can use the system while your program is executing.
This does not mean that interactive or online work is not useful. Both type of processing have their own purposes. Online work is the most common one entering business data, displaying information, printing small reports, managing the system and so on. Background jobs are mainly used for the following tasks; to process large amount of data, to execute periodic jobs without human intervention, to run program at a more convenient, planned time other than during normal working hours i.e., Nights or weekends.
The transaction for background processing is SM36.
Or
Tools ? Administration ? Jobs ? Define jobs
Or
System ? services ? Jobs
Components of the background jobs
A job in Background processing is a series of steps that can be scheduled and step is a program for background processing.
u2022 Job name. Define the name of assigned to the job. It identifies the job. You can specify up to 32 characters for the name.
u2022 Job class. Indicates the type of background processing priority assigned to the job.
The job class determines the priority of a job. The background system admits three types of job classes: A B & C, which correspond to job priority.
u2022 Job steps. Parameters to be passed for this screen are as follows:
Program name.
Variant if it is report program
Start criteria for the job: Option available for this are as follows:
Immediate - allows you to start a job immediately.
Date/Time - allows you to start a job at a specific name.
After job - you can start a job after a particular job.
After event - allows you to start a job after a particular event.
At operation mode - allows you to start a job when the system switches to a particular operation mode.
Defining Background jobs
It is two step process: Firstly, you define the job and then release it.
When users define a job and save it, they are actually scheduling the report i.e., specifying the job components, the steps, the start time.
When users schedule program for background processing, they are instructing the system to execute an ABAP/4 report or an external program in the background. Scheduled jobs are not executed until they are released. When jobs are released, they are sent for execution to the background processing system at the specified start time. Both scheduling and releasing of jobs require authorizations.
HANDLING OF POP UP SCREEN IN BDC
Many times in transaction pop up screen appears and for this screen you donu2019t pass any record but some indication to system telling it to proceed further. For example: The following screen
To handle such screen, system has provided a variable called BDC_CURSOR. You pass this variable to BDCDATA and process the screen.
Usually such screen appears in many transactions, in this case you are just passing information, that YES you want to save the information, that means YES should be clicked. So you are transferring this information to BDCDATA i.e., field name of YES which is usually SPOT_OPTION. Instead of BDC_OKCODE, you are passing BDC_CURSOR.
BDC_CURSOR is also used to place cursor on particular field.
AN EXAMPLE WITH SESSION METHOD
Following program demonstrates how data is passed from flat file to SAP transaction and further to database table by using SESSION method.
The transaction is TFBA (to change customer).
A simple transaction where you are entering customer number on first screen and on next screen data is displayed for the particular customer number. Field, which we are changing here, are name and city. When you click on save, the changed record gets saved.
Prerequisite to write this BDC interface as indicated earlier is:
1. To find screen number
2. To find screen field names, type of the field and length of the field.
3. To find BDC_OKCODE for each screen
4. Create flat file.
Flat file can be created in your hard disk as follows:
1 Vinod Hyderabad
2 Kavitha Secunderabad
3 Kishore Hyderabad
(Where 1st character field is Customer number, 2nd field is Customer name and 3rd field is City.)
To transfer this data to database table SCUSTOM following interface can be used.
REPORT DEMO1.
Following internal table is to upload flat file.
DATA: BEGIN OF ITAB OCCURS 0,
ID(10),
NAME(25),
CITY(25),
END OF ITAB.
*Following internal table BDCDATA is to pass date from internal table to session.
DATA: BDCTAB LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
Variables
DATA: DATE1 LIKE SY-DATUM. DATE1 = SY-DATUM - 1. u201C This is for Hold Date
To upload flat file to internal table.
CALL FUNCTION UPLOAD
EXPORTING
FILE NAME = u2018C:\FF.TXTu2019
FILE TYPE = u2018ASCu201D
TABLES
DATA_TAB = ITAB
EXCEPTIONS
CONVERSION_ERROR = 1
INVALID_TABLE_WIDTH = 2
INVALID_TYPE = 3
NO_BATCH = 4
UNKNOWN_ERROR = 5
OTHERS = 6.
If sy-subrc = 0.
Calling Function to Create a Session
CALL FUNCTION u2018BDC_OPEN_GROUPu2019
EXPORTING
CLIENT = SY-MANDT
GROUP = u2018POTHURIu2019
HOLDDATE = DATE1
KEEP = u2018Xu2019
USER = SY-UNAME
EXCEPTIONS
CLIENT_INVALID = 1
DESTINATION_INVALID = 2
GROUP_INVALID = 3
GROUP_IS_LOCKED = 4
HOLDDATE_INVALID = 5
INTERNAL_ERROR = 6
QUEUE_ERROR = 7
RUNNING = 8
SYSTEM_LOCK_ERROR = 9
USER_INVALID = 10
OTHERS = 11.
If sy-subrc = 0.
*-- MAIN Logic--
LOOP AT ITAB
PERFORM GENERATE_DATA. u201C Populating BDCDATA Table
CALL FUNCTION u2018BDC_INSERTu2019
EXPORTING
TCODE = u2018TFBAu2019
TABLES
DYNPROTAB = BDCTAB
EXCEPTIONS
INTERNAL_ERROR = 1
NOT_OPEN = 2
QUEUE_ERROR = 3
TCODE_INVALID = 4
PRINTING_INVALID = 5
POSTING_INVALID = 6
OTHERS = 7.
REFRESH BDCTAB
ENDLOOP.
Calling function to close the session
CALL FUNCTION u2018BDC_CLOSE_GROUPu2019
EXCEPTIONS
NOT_OPEN = 1
QUEUE_ERROR = 2
OTHERS = 3.
Endif.
Endif.
*& Form GENERATE_DATA
Create BDC Data
FORM GENERATE_DATA
Passing information for 1st screen on BDCDATA
BDCTAB-PROGRAM = u2018SAPMTFBAu2019.
BDCTAX-DYNPRO = 100.
BDCTAP-DYNBEGIN = u2018Xu2019.
APPEND BCDTAB.CLEAR BDCTAB.
Passing field information to BDCDATA
BDCTAB-FNAM = u2018SCUSTOM-IDu2019
BDCTAB-FVAL = ITAB-ID.
APPEND BDCTAB.CLEAR BDCTAB.
Passing BDC_OKCODE to BDCDATA
BDCTAB-FNAM = u2018BDC_OKCODEu2019.
BDCTAB-FVAL = u2018/5u2019.
APPEND BDCTAB.CLEAR BDCTAB.
Passing screen information for next screen to BDCDATA
BDCTAB-PROGRAM = u2018SAPMTFBAu2019.
BDCTAB-DYNPRO = 200.
BDCTAB-DYNBEGIN = u2018Xu2019.
APPEND BDCTAB.CLEAR BDCTAB.
Passing screen information to BDCDATA
BDCTAB-FNAM = u2018SCUSTOM-NAMEu2019.
BDCTAB-FVAL = ITAB-NAME.
APPEND BDCTAB.CLEAR BDCTAB.
Passing screen information to BDCDATA
BDCTAB-FNAM = u2018SCUSTOM-CITYu2019.
BDCTAB-FVAL = ITAB-CITY.
APPEND BDCTAB.CLEAR BDCTAB.
Passing BDC_OKCODE to BDCDATA
BDCTAB-FNAM = u2018BDC_OKCODEu2019.
BDCTAB-FVAL = u2018SAVEu2019.
APPEND BDCTAB.CLEAR BDCTAB.
ENDFORM. u201CGENERATE_DATA
AN EXAMPLE WITH CALL TRANSACTION
Same steps to be repeated for CALL TRANSACTION
The only difference between the two types of interface is in Session method, you create session and store information about screen and data into session. When session is processed the data is transferred to database. While in CALL TRANSACTION, data is transferred directly to database table.
REPORT DEMO1.
Follow above Code till MAIN Logic. Even the Subroutine should be copied
LOOP AT ITAB
PERFORM GENERATE_DATA, u201CPopulating BDCDATA Table
Call transaction u2018TFBAu2019 using BCDDATA Mode u2018Au2019 Update u2018Su2019.
REFRESH BDCTAB
ENDLOOP. -
How to put a report which contains code for BDC in background
Hello Experts ,
Please provide your valuable opinions on following issue,
My BDC execution is taking longer time and it gives time out error. To avoid this problem i have created a separate report which l contains the BDC code (Call transaction ) and i have put this report for background execution. But upon doing this My BDC code is not performing the transaction call which it was performing when it was executed individually. In sm37 it shown the job that i am creating but nothing is actually happening as a result of transaction call.
The code that i have written is :
RFC code
SUBMIT ZREPORT AND RETURN.
RFC end
Z_REPORT .
PERFORM open_job.
PERFORM get_print_parameters.
PERFORM job_submit. here in Submit i have specified the another report name(zbdcreport) which contains the actual logic for bdc
PERFORM job_close.
Report END.
zbdcreport
The call transaction is as follows :
( CALL TRANSACTION TCODE USING BDCDATA
MODE 'N' "CTUMODE "N
UPDATE 'S' "CUPDATE "S
MESSAGES INTO MESSTAB .)
end zbdcreport
Can anybody provide the reason for the error .
Regards,
UmaHi
Check the code using this...
DATA: number TYPE tbtcjob-jobcount,
name TYPE tbtcjob-jobname VALUE 'JOB_TEST',
print_parameters TYPE pri_params.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = name
IMPORTING
jobcount = number
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc = 0.
SUBMIT submitable TO SAP-SPOOL
SPOOL PARAMETERS print_parameters
WITHOUT SPOOL DYNPRO
VIA JOB name NUMBER number
AND RETURN.
IF sy-subrc = 0.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = number
jobname = name
strtimmed = 'X'
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
IF sy-subrc <> 0.
ENDIF.
ENDIF.
ENDIF. -
How to find out the Tcodes for the exits
Hi All,
how to find out the Tcodes for the exits. i have a list of exits (customer, user, badi ). i need to find out what are the Tcode affected by this exits.
Customer Exits: EXIT_RFEBBU10_001
EXIT_RFEKA400_001
EXIT_RFFOEXIT_100
User-Exits: USEREXIT_DELETE_DOCUMENT
USEREXIT_FIELD_MODIFICATION
USEREXIT_MOVE_FIELD_TO_VBAK
USEREXIT_PRICING_PREPARE_TKOMP
BADI: CUSTOMER_ADD_DATA_CS
HISTORICAL_VALUES
MD_ADD_ELEMENTS
MD_CHANGE_MRP_DATA
MD_PIR_FLEX_CONS
MD_PLDORD_POST
ME_REQ_POSTED
NOTIF_EVENT_SAVE
Can anyone help on this <urgency factor removed>.
Regards
Ksihore
Edited by: Suhas Saha on Feb 20, 2012 12:58 PMi have just started reading about all these-user exits ,customer exits etc.
i have read somewhere that:call to customer exits are triggered by function modules exits.
the structure of function modules are like this:
EXIT_RFEBBU10_001
MEANS
Keyword EXIT followed by program name fllowed by three digits.
and the call is like this:
call customer function 0001.
From above we can conclude that this customer exit must be used in program RFEBBU10.
GOTO SE38 andenter prog name RFEBBU10.check for above function module.
for the rest i stick to the same method for user exits and BADI that we can findthe corresponding TCODES
using Where used lists.
please Tell me if i m wrong! -
Problem during recording of CJ01 transaction for BDC
Hello All,
I am facing a problem during the recording of CJ01(Creation of projects) for creation of BDC program.
The problem is during recoding after entering the the first WBS element with level 1 and i press the '+' button to create one more WBS element with Level 2,the first WBS element with level 1 goes to the bottom of the line item table and now if try to create the WBS element with Level 2 in the first line it wont allow because of the fact that the first WBS element with level 1 is below it.
But if i enter the first WBS elemnt with level 1 in the first line and come to the next line and enter the second WBS element with level 2 it will create since Level 2 WBS is below the Level 1.But this approach cannot be used for doing a recording for BDC.
Can anyone help in this regard
Thanks in Advance
AshishHi Ashish,
NW is right. It is not proper to use BDC for CJ01. You can get more control and better if you use the following function module,
1. Use BAPI_PROJECT_MAINTAIN to create project definition and WBS Structure in one go. see the documentation in the BAPI on how to use this. Post the resut in this forum if you face any problem
Ravi -
Function module name for routing fom production orders
Function module name for routing fom production orders
Hi
There are lot of fun modules related to routing
like
BAPI_ROUTING_CREATE
BAPI_ROUTING_EXISTENCE_CHECK
goto SE37 Tcode
enter routing press F4
you will get a lot out of that use the required one
Reward points for useful Answers
Regards
Anji -
Tcode for line item settlement other than tcode CJIC
Dear SAP Guru,
Please let me know the tcode for line item settlement other than tcode CJIC.
Required urgently.
Thanks & regards,
Pradip ShelkeThanks for your reply.
Actually we are trying to create the BDC program for line item settlement. Through both the tcode CJIC & CJ70 this BDC program is not getting created.
So please suggest some other tcode.
Thanks & Regards,
Pradip Shelke
Maybe you are looking for
-
HT2688 Can I install iTunes on an external drive and store my music there?
I am trying to figure out the best way to manage my music. 600 cds that I need to upload somewhere. I am thinking I put them in itunes and then bluetooth them to a wireless speaker. My old school stereo needs to go but I am not sure where to beg
-
Uploading file to the servelet and write directly into database
i want client to upload file to the server (using servlet for that) and i just don't want to store it to the hard disk, but i want to write it into the the ms sql database (that i m using). TIA
-
I am trying to get my iPad to print from hp air printer and it only prints on photo paper. How do I fix it to print on paper. I already put setting to copy on printer but it prints blank.
-
Up until this week I was able to work with the 3d tools in CS4. But the past couple of days all I get is the SBOD, leading to a Force Quit whenever I try to do anything from the 3d menu (convert to postcard, load a 3d object, etc.). I've reset the pr
-
I cant find the settings for the dark keybord on my iphone5
Im from Sweden and i dont have the settinings for the dark keyboard why not?