Posts

Showing posts from 2012

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...

Carry out repairs in non-origina system only if they are urgent

Image
Scenario: When a existing program is going to change in non-development system Solution: This message occurs when developer changing program in non-development system or where the program is not developed originally in that sytem or the system is copy of another system. Since the original program is not developed in the current system you will see this message. This can be removing by changing the original development system of the program. 1. Go totransaction code "SE03" 2.Click on "Change Object Directory Entries" 3. Give the object name choose check box the type of object and the execute  4. choose your program name and double click on that.                                        5. Change the Orginial system name to the current system name  

Converting ABAP Spool to PDF and sending email to Distribution list

Scenario: There is standard report generated by Report painter tool. Now that output of report need to send as PDF format as attachement to multiple users. Solution and Code: Run the standard report as Job, then create ABAP prgoram to capture spool of Job, then convert spool into PDF, then send this PDF attachment thru email to Distribution list. (Note: In SAP business workplace you need to create distibution list by assigning all user Email IDs ) PARAMETERS  p_jobnam  LIKE  tbtcp - jobname . data  send_request   type  ref  to  cl_bcs . data  document       type  ref  to  cl_document_bcs . data  recipient      type  ref  to  if_recipient_bcs . data  bcs_exception  type  ref  to  cx_bcs . data  sent_to_all    type  os_boolean . data  pdf_size     ...