Wednesday, September 26, 2012

Hide Specefic ALV Field at First Run


Below is the syntax to hide ALV field during  program run. This setting need to be applied at fieldcatalog level, user can view the field by used the layout setting.



ta_fieldcatalog-no_out = 'X'.

Tuesday, September 18, 2012

Delete leading zero ABAP



Coding:

*** Output format
    SHIFT wa_repdata-hkont LEFT DELETING LEADING '0'. "GL Account
    SHIFT wa_repdata-lkorr LEFT DELETING LEADING '0'. "Prov Account
    SHIFT wa_repdata-lifnr LEFT DELETING LEADING '0'. "Account No



Output:
       15201010  
       15203020
       6000002

Sunday, September 9, 2012

ALV total and sub total






  - To enable total and sub total in ALV Grid of the fieldcatalog should be in numerical format.

eg:


     valamt TYPE p DECIMALS 2,"18.Value Amount
        amtpst TYPE p DECIMALS 2,"19.Amt Posted
        sapostamt TYPE p DECIMALS 5, "20.Amt Posted in SAP
  END OF ty_report.


  ta_fieldcatalog-fieldname = 'AMTPST'.
  ta_fieldcatalog-seltext_l = 'Amt Posted'.
  append ta_fieldcatalog to ta_fieldcatalog.
  clear ta_fieldcatalog.

  ta_fieldcatalog-fieldname = 'SAPOSTAMT'.
  ta_fieldcatalog-seltext_l = 'Amt Posted in SAP'.
  append ta_fieldcatalog to ta_fieldcatalog.
  clear ta_fieldcatalog. 

 

Tuesday, August 28, 2012

LSMW table List

Below is the list of LSMW table .


/SAPDMC/LISCREEN General (Screen Fields)
/SAPDMC/LSCDOCU Documentation Elements
/SAPDMC/LSCDOCUT Documentation Elements: Name
/SAPDMC/LSCPROGS Parameter Names of the BI/DI Program
/SAPDMC/LSCRULE Rule categories
/SAPDMC/LSCRULET Rule categories
/SAPDMC/LSCSTEPS Work Steps
/SAPDMC/LSCSTEPT Work Step: Name
/SAPDMC/LSCVERSN LSMW Version Number
/SAPDMC/LSGBDC BI Name: "Code"
/SAPDMC/LSGBDCA BI Name: Attributes
/SAPDMC/LSGBDCS BI Name: Structures (Name=PrefixRecordingHlevel)
/SAPDMC/LSGBDCT BI Recording: Name
/SAPDMC/LSGCUST Server-Dependent Settings
/SAPDMC/LSGPRO Projects
/SAPDMC/LSGPROT Project: Name
/SAPDMC/LSGSUB Subprojects
/SAPDMC/LSGSUBT Subproject: Name
/SAPDMC/LSGUSDFI LSMW Files Used
/SAPDMC/LSMCUST Client-Dependent Settings (IDoc Inbound Processing)
/SAPDMC/LSOALG Action Log
/SAPDMC/LSOATT Object Attributes
/SAPDMC/LSOCOD ABAP Code of Conversion Rules
/SAPDMC/LSODOC Documentation
/SAPDMC/LSOFIL File Paths and File Names
/SAPDMC/LSOFIS File Names per R/3 System
/SAPDMC/LSOFIW Files: Values for Wildcard '*'
/SAPDMC/LSOFLD Source Fields
/SAPDMC/LSOINF Legacy Data: Not Yet Used
/SAPDMC/LSOINP Legacy Data: Files
/SAPDMC/LSOINS Legacy Data: Assignment of Files to Source Structures
/SAPDMC/LSOLOG Log Info per Object and Work Step
/SAPDMC/LSOMAP Field Mapping
/SAPDMC/LSOPAR Diverse Parameters
/SAPDMC/LSOPRT Flow and Message Log
/SAPDMC/LSOREC Recordings per Object
/SAPDMC/LSOREL Structure Relationships
/SAPDMC/LSORUL Rule Category
/SAPDMC/LSOSTR Source Structures
/SAPDMC/LSOTXT Objects: Name
/SAPDMC/LSRATT Central Rules: Definition and Attributes
/SAPDMC/LSRCOD Central Rules: Code
/SAPDMC/LSRTXT Central Rules: Name
/SAPDMC/LSRVLI Central Rules: Interval Translation Values
/SAPDMC/LSRVLO Central Rules: 1:1 Translation Values
/SAPDMC/LSUCUST Personal settings
/SAPDMC/LSUMENU User Menu
/SAPDMC/LSUPROF User Profile

Wednesday, June 13, 2012

PE04 - HR Payroll Function How toS

Steps to create HR Payroll Function


  •  Payroll Function used to tied with the scheme ,  you can create or customize scheme using P01
  • Inside the scheme we call the HR Payroll Function and its parameter
  • HR Payroll function need to edit standard program, access key may be required

1) Customize HR Payroll Function should start with Z_ if not it will request to save to SAP Standard Package.

2) Country assigment should be selected, make sure it will be the same country assigned to the scheme Coutnry .

3) It sames go to Input and Out Paremeter, which should carry the same country. 


4) Need to create the function/subroutine to payroll driver program, in this  case it for China,
the subroutine name FUZ_HKC should be in the include program HCNCALC0

INCLUDE PCBURZCN0.        "Customer functions/operations

5) Details on each field is mean for what will be updated later....

             







Generating 'Sflight' Tables

Flight Application or Sflight is famous test table or application in SAP, to enable this application we need to populate  the dummy data. Below is the list of the table in Sflight application and steps to generate or populate the Sflight tables.

1. Run program  SAPBC_DATA_GENERATOR  using SE38.
2. Choose any number data requirement.
3. Execute the program.
4. Below is the screen capture of the program.





Table Name Description
SCARR Airlines
SPFLI  Flight Schedules
SFLIGHT  Flights
SBOOK  Flight Bookings
SCUSTOM  Flight Customers
SFLCONN  Flight Connections
SFLCONNPOS  Route segments of flight connections
SFLTRIP  Flight trips
SFLTRIPPOS Flight trip passsenger 
SFLTRIPBOK  booking numbers for flight trips


source :
http://help.sap.com/erp2005_ehp_04/helpdata/en/db/7c623cf568896be10000000a11405a/content.htm


Friday, May 18, 2012

Cannot be maintained via basic Transaction


Object type Q infotype 1001 cannot be maintained via basic transaction


I got this issues lately, and the tricks we need to maintain the table T777I or T77CD and T777E.

1. Go to SE16 or SE11.
2. Unchecked the coloumn MAINT - Indicator: Cannot be Maintained via Standard Transactions
3. Save and try to create the object using PP01 or PP02.