Posts

Background Job created but transactions not created.

Cocept of Bacth input Sessions and Back ground jobs. First we try to understand concept of batch input programs in SAP. To create any transaction record thru ABAP SAP has provided Batch input Technique. Again there are two techinques to create batch input programs. 1. Call transaction 2. Sessions You need to send all required data in bacth input tables (Structure BDCDATA) then use 1. Call transaction method: In this method program directly calls specified SAP transaction code and creates corresponding records. There will not be any sessions. The error messages can be captured by programming using BDCMSGCOLL structure. This call transaction program can be created as Background Job. So when the job is ran then you see log in SM37, and the job might be finished. But actually the record got errored out. So make sure you program creats error log file. 2. Session method: In this method program puts all related data in sessions and need to be released and processe...

Material relevant tables

MARA - Material Master: General data MAKT - Material Master: Description MARM - Material Master: Unit of Measure MAPE - Material master: Export control file MARC - Material master: Plant data MARD - Material master: Storage location MAST - Material link to BOM MBEW - Material valuation MLGN u2013 Material Master: WM Inventory MLGT u2013 Material Master: WM Inventory type MDIP - Material: MRP profiles (field contents) MKOP - Consignment price segment (old versions of SAP) EBEW - Valuation of sales order stock QBEW - Valuation of project stock MVER u2013 Material Master: Consumption <Plant> DVER u2013 Material Master: Consumption <MRP Area> MVKE u2013 Material Master: Sales <Sales Org, Distr Ch> MLAN - Material Master: Tax indicator MARC - Material Master: Plant data MAPR u2013 Material Master: Forecast MARD u2013 Material Master: Storage Location MCH1 u2013 Material Master: X Plant Batches MCHA u2013 Material Master: Batche...

Report for PO - GR/IR clearing account

Report for GR/IR clearing values for purchase orders. It gives GR amount, Invoice amount and GR/IR clearing amount. tables :  ekko ,  ekpo ,  ekbe ,  ekkn . types :  begin  of  ty_output ,        ebeln    like  ekko - ebeln ,        ebelp    like  ekpo - ebelp ,        ekgrp    like  ekko - ekgrp ,        kostl    like  ekkn - kostl ,        ablad    like  ekkn - ablad ,        menge    like  ekpo - menge ,        docty ( 12 ) ,        belnr    like  ekbe - belnr ,        budat ...

What happens to background job, when system crashed while jobs are running

What happens to background jobs when the system crashes while jobs are running First there is no need to panic. If the system crashes while a session is being processed, the status ("in process") is not changed. To complete the processing, you must first release the session (by choosing Session → Release  ). When the session is processed again, any transactions already processed are not processed again. If any background job created for this session, first background job need to be deleted then release the job. Make sure you got everything before deleting job.

Code for change documents in ABAP using Changedocument function module

Scenario: Need report for change documents for Purchase order for given period. Solution: Use standard SAP function module and pass the proper object class to the function module."CHANGEDOCUMENT_READ_HEADERS" and "CHANGE_DOCUMENT_READ_POSITIONS" For Purchase orders use class as 'EINKBELEG' for other documents the object class need to change. Check the code below. select - options :  S_chgdt   for  ekpo - aedat obligatory .               SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; } .L0S31 { font-style: italic; color: #808080; } .L0S32 { color: #3399FF; } .L0S33 { color: #4DA619; } .L0S52 { color: #0000FF; } .L0S55 { color: #800080; } .L0S70 { color: #808080; } data :  v_fromdt  like  CDHDR - UDATE ,       v_todate  like  CDHDR - UDATE . data :  it_cdhdr  like  standa...

Use Full Transaction codes in SAP

CG3Z        Uploading file from desktop to Application server CG3Y       Downloading file from Application server to Desktop.

Transfer internal table data into PC file using class CL_GUI_FRONTEND_SERVICES

Scenario: Need to tansfer internal table data into  PC file or desktop file using class CL_GUI_FRONTEND_SERVICES in ABAP Solution: check the code below tables :  lfa1 . types :  begin  of  ty_lfa1 ,        lifnr ( 10 )  type  c ,        name1 ( 35 )  type  C ,        land1 ( 2 )  type  c ,         end  of  ty_lfa1 . Data :  it_data  type  standard  table  of  ty_lfa1 . data :  wa_data  type  ty_lfa1 . data :  v_filename  type  string ,       v_path      type  string ,       v_fullpath  type  string ,       v_action    type  I . select - options :  s...