Function Module to get Company code and Plant on the basis of infotype and pernr

Hi Experts,
I need to know the function module which will return company code and plant based on infotype and pernr(employee Number).
Thanks,
Salil Bagchi

I think thats the only way
CALL FUNCTION 'CU_READ_RGDIR'
    EXPORTING
      persnr          = p0001-pernr
    TABLES
      in_rgdir        = it_rgdir
    EXCEPTIONS
      no_record_found = 1
      OTHERS          = 2.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
check whether "Pay date for payroll result" with in Start Date and
              End date, and "Reason for Off-Cycle Payroll" is initial
  LOOP AT it_rgdir WHERE paydt >= v_begda
                         AND paydt <= v_endda AND
                         void IS INITIAL
                         AND ocrsn IS INITIAL
                         AND srtza = 'A'.
    v_seqnr = it_rgdir-seqnr.
ENDLOOP.
Hope this helps.
Thanks
Kiran

Similar Messages

  • Table or Function Module to get Condition Values of Quotation

    Hi MM Gurus
    I created RFQ. Then I maintained Quotation for few Vendors. In the Quotation, I used tax code relevant to taxes in India (TAXINN procedure). I am asked to develop a Z report with the help of ABAPer to compare the quotations with Gross price, discounts, freight along with taxes like Excise Duty, VAT etc. When I had put this Quotation number in EKKO table, I am not getting the condition document number KNUMV. For other purchasing documents, this field is getting generated. Without this field, I can not get Condition values using KONV table as we need to link EKKO-KNUMV with KONV-KNUMV. Do you have any idea how we get the condition values of taxes for Quotation? Is there any function module to get it?
    I really appreciate the quick answer.
    Thanks
    Ravi

    Hi
    Try ME_GET_PRICE_CONDITION
    Regards
    Antony

  • Function Module to get PO details based on Plant and PO date

    Hi
    1. Is there any Function Module to get PO details based on Plant and PO date?
    2. Is there any Function Module to get Material document details based on PO number?
    Thanks
    Narendra

    hi,
    check these standard reports.
    ME2L - By vendor
    ME2M - By material
    MSRV3 - By service
    ME2K - By account assignment
    ME2C - By material group
    ME2B - By tracking number
    ME2N - By PO number
    ME2W - By supplying plant
    also chck this func module.
    REPL_LIST_PURCHASE_ORDER_READ
    reward if hlpful.

  • Table or Function module to get Internal order planning and Cost element pl

    Dear All,
    Table or Function module to get Internal order planning and Cost element planning.
    Internal order planning from T-code KO13.
    Thanks in advance.
    Regards,
    Ravi
    Edited by: Ravi Chandra on Sep 13, 2011 8:08 AM

    BPEJ, BPEG, BPEP

  • Function module to get the BOM details for a material-plant combination

    hi
    Is there any function module to get the BOM details such as
            BOM Usage       -STLAN
            Alternative BOM -STLAL
            Items                -POSNR
            Required Quantity-EMENG
            Resulting Quantity-MENGE
            Unit of measure    -BMEIN
            Base unit of measure-MEINS
    for a given material-plant combination
    if so please suggest me some FMs.................
    Awaiting for ur reply..............

    try the below fm it may be useful for you
    DATA : BEGIN OF I_BOM OCCURS 0.
            INCLUDE STRUCTURE STPOX.
    DATA : END OF I_BOM.
    CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
        EXPORTING
          CAPID                 = 'PP01'
          DATUV                 = SY-DATUM
          MEHRS                 = 'X'
          MTNRV                 = P_MATNR
          WERKS                 = P_WERKS
        TABLES
          STB                   = I_BOM
        EXCEPTIONS
          ALT_NOT_FOUND         = 1
          CALL_INVALID          = 2
          MATERIAL_NOT_FOUND    = 3
          MISSING_AUTHORIZATION = 4
          NO_BOM_FOUND          = 5
          NO_PLANT_DATA         = 6
          NO_SUITABLE_BOM_FOUND = 7
          CONVERSION_ERROR      = 8
          OTHERS                = 9.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    just befor use it check your application area.for my case it is PP01. you can find it in CS12 when you are exploding the bom the value you are giving in BOM application that is the value for CAPID.
    Just go to se37 and checkout the fm it has lot of options here I am using the minimum things.
    regards
    shiba dutta

  • Function module to get the valid Subcontract BOM and components for Pur doc

    Hello Gurus,
    I need help to create a z report of subcontracting bom and their components exploded in Schedule agreement. Seems like there is no standard report which can give the boms from purcashing doc.  Can someone please tell me the name of the function module for it? any help will be highly appreciated.
    Regards,
    Owais

    hi
    u can use
    STPO BOM - item
    STAS BOMs - Item Selection
    STZU Permanent BOM data
    also check stko or mast or stpo
    or
    Perhaps you can run ST05 while run some transaction for display the
    BOM.
    Once the transaction for display the BOM gets finished, you need to stop the
    trace on ST05 and then display it, you will see tables readden in the
    transaction,
    not tried plz check*
    reward if helpful
    regards
    kunal
    Edited by: kunal ingale on Jul 22, 2008 6:21 AM

  • Function  module to get pernt by passinf objid and otype

    Hi,
    Help me to find any function module to get pernr by using objid and otype.or table name from which we can get pernr by passing objid and otype.
    thanks,
    satish.

    You are talking about on the OM side and obtain the perner via object P?
    You can through a few method. One is using evaluation path. There is a function module called HR_STRUC_GET which allow you to pass evaluation path to get the result.
    Using that, you could create a simple evaluation path from position (object s) to person (object p). The object ID of object P is your pernr.
    Unless you have central person functionality, that might no longer be the case.

  • Function Module to get pernr number based on first name and last name

    Hi All,
    What is the Function Module to get pernr number based on first name and last name.
    Could you please help me.
    T@R.
    Vidya

    hi Vidya,
    you can get perner from PA0002 based on firs name and last name.
    use select query and get perner.

  • Function module to get attribute and value from organisation model

    Hi
    I need a function module to get the attribute and its corresponding values set on the sales org stucture.The export parameter will be the Sales Org Id.
    Please reply ASAP.
    Edited by: prem kumar on Apr 16, 2009 9:37 AM

    Hi Prem,
    If it helps, we use FM RHGA_READ_ATTRIBUTES for that in version 4.
    Kind regards,
    Garcia

  • Function Module to get usage by supplying measuring point and equipment no

    Hi,
    I want to know what is the function module to get the usage on giving the measuring point,equipment number and month.Thanks in advance.
    Regards,
    SGR

    Try this Function Module : ALM_ME_EQUIPMENT_GETDETAIL

  • Function module to get the dates from the year and the period

    Is there a function Module to get the dates from the year and the period

    Check with :
    To get last day of period use .
    LAST_DAY_IN_PERIOD_GET.
    To get last of month Use :
    RE_LAST_DAY_OF_MONTH
    HRVE_LAST_DAY_OF_MONTH
    LAST_DAY_OF_MONTHS
    ISB_PREVIOUS_PERIOD_DATE_GET
    Thanks
    Seshu

  • Function Module to get BEGIN and END date of a month?

    Hello everybody,
    Is there any function module to get BEGIN and END date of a month
    GIVEN EITHER THE CURRENT SYSTEM DATE or MONTH?
    Regards,
    Sanghamitra.A.

    hi
         CALL FUNCTION 'PA03_PERIODDATES_GET'
            EXPORTING
              f_abkrs               = p_abkrs1
            IMPORTING
              f_permo               = wf_permo
              f_current_begda       = wf_begda
              f_current_endda       = wf_endda
            CHANGING
              f_current_period      = wf_pabrp
              f_current_year        = wf_pabrj
            EXCEPTIONS
              pcr_does_not_exist    = 1
              abkrs_does_not_exist  = 2
              period_does_not_exist = 3
              OTHERS                = 4.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
    this is the function module to get the first date and last date of a particular month
    if u have any doubts ask
    regads
    karthik
    reward points if useful

  • BAPI function module to get condition type and its values based on delivery number?

    Hi All,
    I would like to have the BAPI function module to get condition type value based on delivery number before invoice is created.please provide detail program for as a reference .please reply as soon as possible its urgent.
    Regards,
    saaikumar.

    If you haven't already, you may first need to search via the SAP transaction "BAPI" in the area this is applicable to.  Failing that I do hope you get an answer.

  • Function module for getting Vendor Address details

    Hi,
    Im new to this group,and new to ABAP
    plz hep me out by solving ABAP Query...
    i want to generate a report for getting Vendor Details
    like Vendor address,Ph num and Email
    input fields are Company code,country key and Account Group.
    im Using Smart Forms for this..
    but im not getting the Exact Function module to get All Required Details..
    regards
    Smitha

    thanks for ur quick reply...
    SELECT SINGLE LIFNR
      FROM LFB1
      INTO V_LIFNR
      WHERE BUKRS EQ V_BUKRS.
      CALL FUNCTION 'VENDOR_READ'
        EXPORTING
          i_bukrs         = V_BUKRS
          i_lifnr         = V_LIFNR
        EXCEPTIONS
         NOT_FOUND       = 1
         OTHERS          = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    this is the code i have written...
    but my problem is there no table in the Function module....
    for Example...
    CALL FUNCTION 'QPAX_PLMKB_READ_FROM_PLKO'
        EXPORTING
          i_plnty            = 'Q'
          i_plnnr            = V_PLNNR
          I_PLNAL            = V_PLNAL
          i_sttag            = V_DATUV
       TABLES
        T_PLMKB_TAB        = IT_TAB
    i want the function modules with tables and proper input...

  • Function Module to fetch Release Code for PReqs

    Hi,
    Is there any function module to get the current release code applicale by passing the requisition number?
    Example : If we have 4 levels of approval, say A1,A2,A3 and A4, and I want to know with what release code shall I release the requisition.
    If release has benn effected for the requisition with codes A1 and A2 and if I query with the function module what is the current release code applicable, then it should give A3 or atleast a result that A2 has been the last release code effected.
    Also where is the release related info stored ? I mean which tables...
    Not the release strategy related info but the release effected info.
    Dont worry about points...

    Hi
    Pur requisition Release Codes are stored in <b>T161E</b> table
    Release code is linked with Release strategy in <b>T161F</b> table
    Link the code with Release strategy field in <b>EBAN</b> table
    Also check the fun modules
    MM_CHECK_RELEASE_CODE_EQUAL_KI
    MM_CHECK_RELEASE_CODE_NOT_KI
    ME_RELEASE_REQUISITION
    BAPI_REQUISITION_RELEASE
    Reward points if useful
    Regards
    Anji
    Message was edited by:
            Anji Reddy Vangala

Maybe you are looking for

  • Mac Manager and Internet Explorer

    If a mac manager user puts an "*" as the URL in Internet Explorer, the desktop and other folders (which they should not see) show up and are accessable. This also appears to affect WGM user in OS X IE. Does anyone know how to prevent this? Robert.

  • Problem in assigning Add on to a mobile device.

    Hi All, We are facing a problem creating an addon for RFID dll into a moblie device. In the file manifest we provided INSTALLATIONDIR: \windows. Instead of placing the dll into windows folder of mobile root it is creating a new folder named windows i

  • CS6 Error message after download

    PS CS6 Error message after Download HP Pavilion dv7 Notebook PC Intel Core i7-2670QM CPU @2.20 GHz 64 Bit OS Win 7 Home Premium SP1 Question:  Should I open to use this, or erase and download again?  Wanted you to know as this is in Beta. Steps I fol

  • Genius Not So Smart?

    I've had this problem on both my Mac and iPhone in iTunes. I choose a song to build a genius playlist off of and get this message: Try Again This song does not have enough related songs to create a Genius Playlist. The song was from an album, ("Amazi

  • Getting the page name

    Hi, I have a JSP, which is redirected to a servlet. I want to know from which page the request to the servlet is coming from, but am not able to figure that out. If you could please guide me for the same. Thanks and Regards, Sapan..