Function Module to extract char values for a matl variant

Experts,
Looking for a Function Module with which I can extract the Char value for a specific characteristic on my material variant. So, the class type is 300 & I would like to pass this material (variant) as an input in order to retrieve the value for the specific characteristic (which will be unique to this variant)
Any one, an idea?
thanks

Ok, I found what I needed. For everyone's benefit, herez what I found:
1. every application/object in the SAP side which uses the configuration has a unique Internal Object #. For material variants, Sales Documents, Prodn Ord headers & components, so on so forth.
2. In the system the fields CUOBF, CUOBJ carry these Internal Obj #'s. For the sake of getting the material variant char & values I found the func module VC_I_GET_CONFIGURATION, where the input could be the Int Obj # from the MARA or the one from VBAP, based on the need.
Thanks

Similar Messages

  • Function module to change the value for pricing condition type

    Hello experts,
    I want to change the value for pricing condition type for an item in the transaction CRMD_ORDER.
    I used many function modules but none are working.
    Please kindly suggest a function module that will change the value for a condition type .
    I have used the following function module but its not working, please correct the coding if anything needs to be changed or added. Please help me .
    Thank you.
    CLEAR PRCD_COND.
         SELECT SINGLE * FROM PRCD_COND WHERE KPOSN = WA_ORDERADM_I-GUID AND
                                              KSCHL = COND_TY.
      IF SY-SUBRC = 0.
    *    MOVE-CORRESPONDING PRCD_COND TO L_COND_CHG.
    *    CLEAR L_COND_CHG-KBETR.
        L_COND_CHG-STUNR = PRCD_COND-STUNR.
        L_COND_CHG-KBETR = COND_PRC.
    *    L_COND_CHG-KSCHL = COND_TY.
        INSERT L_COND_CHG INTO TABLE T_COND_CHG.
    L_HEAD_GUID = CRMD_ORDERADM_H-GUID.
    L_ITEM_GUID = WA_ORDERADM_I-GUID.
    INSERT L_HEAD_GUID INTO TABLE HEAD_GUID.
    INSERT L_ITEM_GUID INTO TABLE ITEM_GUID.
        CALL FUNCTION 'CRM_ORDER_READ'
         EXPORTING
           IT_HEADER_GUID                    = HEAD_GUID
           IT_ITEM_GUID                      = ITEM_GUID
         IMPORTING
           ET_ORDERADM_H                     = LT_ORDERADM_H
           ET_ORDERADM_I                     = LT_ORDERADM_I
           ET_PRIDOC                         = IT_PRIDOC_RD
           ET_DOC_FLOW                       = T_DOC_FLOW
    *     CHANGING
    *       CV_LOG_HANDLE                     =
    *     EXCEPTIONS
    *       DOCUMENT_NOT_FOUND                = 1
    *       ERROR_OCCURRED                    = 2
    *       DOCUMENT_LOCKED                   = 3
    *       NO_CHANGE_AUTHORITY               = 4
    *       NO_DISPLAY_AUTHORITY              = 5
    *       NO_CHANGE_ALLOWED                 = 6
    *       OTHERS                            = 7
        IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    MOVE-CORRESPONDING LS_PRIDOC_RD TO L_PRI_COND.
    INSERT L_PRI_COND INTO TABLE PRI_COND.
    LOOP AT IT_PRIDOC_RD INTO LS_PRIDOC_RD.
    MOVE-CORRESPONDING LS_PRIDOC_RD TO L_PRIDOC_CHG.
    L_PRIDOC_CHG-PRIC_COND = PRI_COND.
    L_PRIDOC_CHG-REF_GUID = LS_PRIDOC_RD-GUID.
    L_PRIDOC_CHG-COND_CHANGE = T_COND_CHG.
    INSERT L_PRIDOC_CHG INTO TABLE PRIDOC_CHG.
    ENDLOOP.
    LOOP AT LT_ORDERADM_H INTO LS_ORDERADM_H .
    MOVE-CORRESPONDING LS_ORDERADM_H TO L_HEADER.
    INSERT L_HEADER INTO TABLE HEADER.
    ENDLOOP.
    LOOP AT LT_ORDERADM_I INTO LS_ORDERADM_I.
    MOVE-CORRESPONDING LS_ORDERADM_I TO L_ITEM.
    INSERT L_ITEM INTO TABLE ITEM.
    ENDLOOP.
    L_FIELD-FIELDNAME = 'STUNR'.
    INSERT L_FIELD INTO TABLE FIELD.
    L_FIELD-FIELDNAME = 'KBETR'.
    L_FIELD-CHANGEABLE = 'X'.
    INSERT L_FIELD INTO TABLE FIELD.
    L_INPUT-FIELD_NAMES = FIELD.
    L_INPUT-REF_KIND = 'E'.
    L_INPUT-REF_GUID = LS_PRIDOC_RD-GUID.
    L_INPUT-OBJECTNAME = 'PRIDOC'.
    INSERT L_INPUT INTO TABLE INPUT.
        CALL FUNCTION 'CRM_ORDER_MAINTAIN'
         EXPORTING
           IT_PRIDOC                     = PRIDOC_CHG
         IMPORTING
           ET_EXCEPTION                  = EXCEPT
         CHANGING
           CT_INPUT_FIELDS               = INPUT.
        IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    REFRESH EXCEPT.
    CALL FUNCTION 'CRM_ORDER_SAVE'
      EXPORTING
        IT_OBJECTS_TO_SAVE         = HEAD_GUID
    *   IV_UPDATE_TASK_LOCAL       = FALSE
    *   IV_SAVE_FRAME_LOG          = FALSE
    *   IV_NO_BDOC_SEND            = FALSE
    *   IT_ACTIVE_SWITCH           =
    IMPORTING
       ET_SAVED_OBJECTS           = SAVED
       ET_EXCEPTION               = EXCEPT
       ET_OBJECTS_NOT_SAVED       = UNSAVED
    * CHANGING
    *   CV_LOG_HANDLE              =
    * EXCEPTIONS
    *   DOCUMENT_NOT_SAVED         = 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.
    COMMIT WORK AND WAIT.

    Hi,,
    To be able to call a function module in an update work process, you must flag it in the Function Builder. When you create the function module, set the Process Type attribute to Update with immediate start
    Alternatively u can use this function module.
    CRM_STATUS_DATA_SAVE_DB
    BAPI_CUSTOMERCRM_CHANGE (If u wish to use a bapi for this).
    Also , Let me know what error you got when implementing other function module.Does the function module didnt return any error but still the value is not changed for pricing condition type?

  • Hi. i used Function module to change Characteristic values of a sales order

    hi. i used Function module to change Characteristic values of a sales order..
    but sales order's Characteristic values didn't change.
    And the Function module doesn't occur any log message.
    please tell me wrong code, and how to solve this problem.
    if i have wrong method, what data can i pass to change the characteristic values
    DATA: LT_E1CUVAL    TYPE TABLE OF E1CUVAL.
      DATA: WA_E1CUVAL    TYPE E1CUVAL.
      DATA: LS_CFG_HEAD   LIKE CUXT_CUCFG_S,
            LS_INSTANCES  LIKE CUXT_CUINS_S,
            LS_VALUES     LIKE CUXT_CUVAL_S,
            LS_E1CUCFG    LIKE E1CUCFG,
            LS_E1CUINS    LIKE E1CUINS,
            LS_E1CUVAL    LIKE E1CUVAL,
            LS_PROFILE    LIKE E1CUCOM,
            LS_VBAP       LIKE VBAP,
            L_CUOBJ       LIKE INOB-CUOBJ,
            L_ATINN       LIKE CABN-ATINN.
      DATA: LT_INSTANCES  LIKE CUXT_CUINS_S OCCURS 0,
            LT_PART_OF    LIKE CUXT_CUPRT_S OCCURS 0,
            LT_VALUES     LIKE CUXT_CUVAL_S OCCURS 0,
            LT_VAR_KEYS   LIKE CUXT_CUVK_S  OCCURS 0,
            LT_KSML       LIKE KSML         OCCURS 0 WITH HEADER LINE,
            BEGIN OF LT_CLINT OCCURS 0,
              CLINT  LIKE KSSK-CLINT,
            END OF LT_CLINT.
      DATA: LT_CUIB       LIKE CUIB_CUOBJ_S OCCURS 0 WITH HEADER LINE.
      DATA: E_ROOT_INSTANCE           TYPE     CUXT_INSTANCE_NO.
      DATA: EV_ROOT_PERSIST_ID     TYPE     IBEXTINST_DATA-EXT_INST_ID.
      DATA: EV_CFG_HAS_CHANGED     TYPE     XFELD.
      DATA: EV_HANDLE_APPL_LOG     TYPE     BALLOGHNDL.
      DATA: L_CUOBJ_NEW           TYPE CUOBJ.
      DATA: L_OWNER               TYPE IBXX_BUSINESS_OBJECT.
      REFRESH LT_E1CUVAL.
      CLEAR LS_VBAP.
      SELECT SINGLE CUOBJ INTO CORRESPONDING FIELDS OF LS_VBAP
                                FROM VBAP WHERE VBELN = I_VBELN
                                            AND POSNR = I_POSNR.
      IF SY-SUBRC <> 0.
        RAISE INSTANCE_NOT_FOUND.
      ENDIF.
      REFRESH LT_CUIB. CLEAR LT_CUIB.
      LT_CUIB-INSTANCE = LS_VBAP-CUOBJ.
      APPEND LT_CUIB.
      CALL FUNCTION 'CUCB_INITIALIZER'
        EXPORTING
          IT_INSTANCES = LT_CUIB[].
      CALL FUNCTION 'CUXI_GET_SINGLE_CONFIGURATION'
        EXPORTING
          I_ROOT_INSTANCE              = LS_VBAP-CUOBJ
        IMPORTING
          E_CFG_HEAD                   = LS_CFG_HEAD
          ES_PROFILE                   = LS_PROFILE
          ET_RETURN                    = ET_RETURN
        TABLES
          E_TAB_INSTANCES              = LT_INSTANCES
          E_TAB_PART_OF                = LT_PART_OF
          E_TAB_VALUES                 = LT_VALUES
          E_TAB_VAR_KEYS               = LT_VAR_KEYS
        EXCEPTIONS
          INVALID_INSTANCE             = 1
          NO_ROOT_INSTANCE             = 2
          INSTANCE_IS_A_CLASSIFICATION = 3
          INTERNAL_ERROR               = 4
          NO_PROFILE_FOUND             = 5
          INVALID_DATA                 = 6
          OTHERS                       = 7.
      IF SY-SUBRC <> 0.
        CASE SY-SUBRC.
          WHEN 1.
            RAISE INSTANCE_NOT_FOUND.
          WHEN 3.
            RAISE INSTANCE_IS_A_CLASSIFICATION.
          WHEN OTHERS.
            RAISE INVALID_DATA.
        ENDCASE.
      ELSE.
        LOOP AT LT_VALUES INTO LS_VALUES.
          IF    LS_VALUES-CHARC = 'SAP_MILLCA_PACKAGING'
             OR LS_VALUES-CHARC = 'PD_CA_PACKING_DM'.
            LS_VALUES-VALUE = '7100010'. "This is test data
            MODIFY LT_VALUES FROM LS_VALUES.
          ELSE.
            DELETE LT_VALUES WHERE CHARC = LS_VALUES-CHARC.
          ENDIF.
          CLEAR LS_VALUES.
        ENDLOOP.
      ENDIF.
    &#50689;&#50629;&#51221;&#48372; &#53945;&#49457; &#48320;&#44221;
      CALL FUNCTION 'CUXI_SET_SINGLE_CONFIGURATION'
        EXPORTING
          I_CFG_HEADER                        = LS_CFG_HEAD
          I_ROOT_INSTANCE                     = LS_VBAP-CUOBJ
        I_PLANT                             =
        I_STRUCTURE_EXPLOSION_DATE          =
        I_STRUCTURE_EXPLOSION_APPL_ID       =
        I_LOGSYS                            =
          IS_PROFILE                          = LS_PROFILE
        IV_ONLY_SINGLE_LEVEL                =
        IV_HANDLE_APPL_LOG                  =
        IV_OBJECT_APPL_LOG                  = 'CIF'
        IV_SUBOBJECT_APPL_LOG               = 'T_CNFG'
        IMPORTING
          E_ROOT_INSTANCE                     = E_ROOT_INSTANCE
          EV_ROOT_PERSIST_ID                  = EV_ROOT_PERSIST_ID
          EV_CFG_HAS_CHANGED                  = EV_CFG_HAS_CHANGED
          EV_HANDLE_APPL_LOG                  = EV_HANDLE_APPL_LOG
          ET_RETURN                           = ET_RETURN
        TABLES
          I_TAB_INSTANCES                     = LT_INSTANCES
          I_TAB_PART_OF                       = LT_PART_OF
          I_TAB_VALUES                        = LT_VALUES
          I_TAB_VAR_KEYS                      = LT_VAR_KEYS
        I_TAB_BLOB                          =
        EXCEPTIONS
          NO_CONFIGURATION_DATA               = 1
          NO_ROOT_INSTANCE                    = 2
          INVALID_INSTANCE                    = 3
          INSTANCE_IS_A_CLASSIFICATION        = 4
          INTERNAL_ERROR                      = 5
          NO_PROFILE_FOUND                    = 6
          INVALID_DATA                        = 7
          OTHERS                              = 8
      IF SY-SUBRC <> 0.
        CASE SY-SUBRC.
          WHEN 1.
            RAISE NO_CONFIGURATION_DATA.
          WHEN 3.
            RAISE NO_ROOT_INSTANCE.
          WHEN 3.
            RAISE INVALID_INSTANCE .
          WHEN 3.
            RAISE INSTANCE_IS_A_CLASSIFICATION.
          WHEN 3.
            RAISE INTERNAL_ERROR.
          WHEN OTHERS.
            RAISE INVALID_DATA.
        ENDCASE.
      ENDIF.
      COMMIT WORK.
    save configuration with next commit
      CLEAR: LS_INSTANCES.
      READ TABLE LT_INSTANCES INTO LS_INSTANCES INDEX 1.
    L_OWNER-OBJECT_TYPE = LS_INSTANCES-OBJ_TYPE.
      L_OWNER-OBJECT_TYPE = 'PVS_POSVAR'.
      L_OWNER-OBJECT_KEY  = LS_INSTANCES-OBJ_KEY.
      CALL FUNCTION 'CUCB_CONFIGURATION_TO_DB'
        EXPORTING
          ROOT_INSTANCE         = LS_VBAP-CUOBJ
          ROOT_OBJECT           = L_OWNER
        IMPORTING
          NEW_INSTANCE          = L_CUOBJ_NEW
        EXCEPTIONS
          INVALID_INSTANCE      = 1
          INVALID_ROOT_INSTANCE = 2
          NO_CHANGES            = 3
          OTHERS                = 4.
      IF SY-SUBRC > 1 AND SY-SUBRC <> 3.
        CLEAR LS_VBAP-CUOBJ.
        RAISE INTERNAL_ERROR.
      ELSEIF SY-SUBRC = 1.
        LS_VBAP-CUOBJ = L_CUOBJ_NEW.
      ENDIF.
    What's wrong?
    help me to solve this problem.
    Thanks a lot.

    <b>SD_SALES_DOCUMENT_READ</b> Reads sales document header and business data: tables VBAK, VBKD and VBPA (Sold-to (AG), Payer (RG) and Ship-to (WE) parties)
    <b>SD_SALES_DOCUMENT_READ_POS</b> Reads sales document header and item material: tables VBAK, VBAP-MATNR
    <b>SD_DOCUMENT_PARTNER_READ</b> partner information including address. Calls SD_PARTNER_READ
    <b>SD_PARTNER_READ</b> all the partners information and addresses
    <b>SD_DETERMINE_CONTRACT_TYPE</b>
    In: at least VBAK-VBELN
    Exceptions: NO CONTRACT | SERVICE_CONTRACT | QUANTITY_CONTRACT
    <b>SD_SALES_DOCUMENT_COPY</b>
    <b>RV_ORDER_FLOW_INFORMATION</b> Reads sales document flow of sales document after delivery and billing
    SD_SALES_DOCUMENT_SAVE create Sales Doc from the copied document
    SD_SALES_DOCUMENT_ENQUEUE to dequeue use DEQUEUE_EVVBAKE
    RV_DELIVERY_PRINT_VIEW Data provision for delivery note printing
    SD_PACKING_PRINT_VIEW
    SD_DELIVERY_VIEW Data collection for printing
    called from RV_DELIVERY_PRINT_VIEW, SD_PACKING_PRINT_VIEW
    RV_BILLING_PRINT_VIEW Data Provision for Billing Document Print
    regards
    vinod

  • Function Module to validate a value against domain fixed values

    Hi,
    Could anybody please let me know if there is a standard Function Module that takes a Value and Domain name as an input and checks if the input value exists in the Fixed Values of the domain.
    Thanks,
    Shalabh

    Hi,
    you can use fm FM_DOMAINVALUE_CHECK. Pass parameter values for I_DOMNAME and I_DOMVALUE.
    If the value is invalid, exception VALUE_NOT_ALLOWED will occur.
    Regards,
    Klaus

  • Function module to find charateristic values

    hi all,
    i need to find charateristic value and characteristic description for the given class type and batch number (CHARG) of a material.. is there any function module that gives these value because this value r not stored in the tables..
    thanks in advance,
    aswin.

    Hi,
    Please check this FM.
    VC_I_GET_CONFIGURATION
    CUCB_GET_CONFIGURATION
    call function 'VC_I_GET_CONFIGURATION'
      exporting
        INSTANCE                    = vbap-cuobj
        LANGUAGE                    = SY-LANGU
      TABLES
        CONFIGURATION               = i_config
      EXCEPTIONS
        INSTANCE_NOT_FOUND          = 1
        INTERNAL_ERROR              = 2
        NO_CLASS_ALLOCATION         = 3
        INSTANCE_NOT_VALID          = 4
        OTHERS                      = 5.
    OR
    data: i_char type table of comw with header line.
    * Retrieve Characteristics.
      call function 'CUD0_GET_VAL_FROM_INSTANCE'
           exporting
                instance           = vbap-cuobj
           tables
                attributes         = i_char
           exceptions
                instance_not_found = 1.
    Regards,
    Ferry Lianto

  • Is there any function module to give absolute value of a number?

    Hi,
    Is there any function module to give absolute value of a number?
    That has similar functionality to the Built in Function ABS.
    Please let me know.
    Thanks,
    cs

    hi,
    why are you looking for any function module.
    You can easily get it by mathematical function ABS .
    Syntax : <Turget Variable> = ABS <Source Variable>
    \[removed by moderator\]
    Anirban Bhattacharjee
    Edited by: Jan Stallkamp on Jun 27, 2008 4:19 PM

  • Function Module to Update the values in STPO!! VERY URGENT!!!!!!!!!!!!!!!!!

    Hi All,
    Can any one tell me is there any Remote function module to update the values of components in STPO table while creating Sales order BOM, Material BOM, and WBS BOM. For example I want to update the Spare Part Indicator for Item components based on Plant.
    Please do the needful..
    Regards
    Yathish

    Hi Naren,
    Thanks for ur reply,
    The BAPI that you have gave is to update only Material BOM. But I want to Change  and create spare part indicator for 4 BOM's, ie Sales Order BOM, Eqipment BOM and also Material BOM and WBS BOM.
    Can u please shed some light on it,so that it would be helpfull to me.
    Thanks
    Yathish

  • Function module to update the values in STPO table :   VERY URGENT!!!!!!!!!

    Hi All,
    Can any one tell me is there any Remote function module to update the values of components in STPO table while creating Sales order BOM, Material BOM, and WBS BOM. For example I want to update the Spare Part Indicator for Item components based on Plant.
    Please do the needful..
    Regards
    Yathish

    For material bom: CSAP_MAT_BOM_CREATE
    and CSAP_ORD_BOM_CREATE for Order BOM.
    Regards,
    Ravi

  • Creating BW Function module to extract R3 Function module data.

    Could you tell me how to create a BW Function Module to Extract data from  R/3 Function module?.
    Also, the BW function module needs to pass a date/time filter to R/3 function module basis which the R/3 function module passes the date/time restricted data to BW function module.
    Thanks,
    Gautam

    You will have to create a function module in R/3 and then call the same in BW using the RFC call function option.
    Please do not raise separate threads for each question - you have asked the same question in another post of yours..
    bw extraction using function module
    http://tinyurl.com/lwhtk8
    this will give you an idea on how you can achieve this.

  • Confirm the char value for in UTF8

    Hi Team,
    we are facing an issue with one of the special characters in Oracle Database:
    1. We have description with ® in description
    2. We have the database charset as UTF8
    3. The setting for the application is Unicode
    4. When we query the item on the Application, SQL Developer, the description shows fine
    5. When we run the query connecting to the UNIX server with the charset UTF8, the description shows fine.
    6. When we run the query connecting to the UNIX Server with the charset ISO-8859-1:1998 (Latin-1, West Europe), the description shows ® instead of ®.
    7. The character value in the database shows as 49838.
    8. When we check for the query SELECT CHR (49838) FROM DUAL in SQL developer, the output shows as ®
    9. When we check for the query SELECT CHR (49838) FROM DUAL with the UTF8 as charset then the output shows as ®
    10. When we check for the query SELECT CHR (49838) FROM DUAL with the ISO-8859-1:1998 (Latin-1, West Europe) as charset then the output shows as ®
    11. We have also tried copying the character ® from charmap and using it in the description and even then it shows as ® when connected to UNIX using the charset ISO-8859-1:1998 (Latin-1, West Europe)
    Can anyone confirm the char value for ® in UTF8.
    Thanks
    Madhavi Gadicherla

    194 174 (hex C2 AE)
    http://www.denalimultimedia.com/info/Articles.aspx?cid=07&topic=unicode_utf-8
    http://www.utf8-zeichentabelle.de
    http://www.williamrobertson.net/documents/ascii.html
    194 when interpreted on its own is the  character, and 174 is &reg;. The application needs to know it's a 2-byte UTF-8 character.
    49838 is C2A2 in hex, which looks correct for the CHR function in a UTF-8 database.

  • Function module to choose the file for download and upload

    what is the function module to choose the file for download and upload  for presentation server.
    give me with example

    Please search in SCN.
    This has been discussed so many times.

  • Function module to validate input value

    Hi all,
    can you please provide me the name of the function module to validate input value.
    I have a case where i have to validate decimal values. sometimes users may enter wrong decimal values by mistake instead of  "0.23" "0..23' and it gives CONVT_NO_NUMBER runtime error so have to come up with some solutions to validate user input.
    Please provide me Function module if anybody knows.
    Thanks,

    Try this one
    data: lv_htype TYPE dd01v-datatype.
        CALL FUNCTION 'NUMERIC_CHECK'
          EXPORTING
            string_in = my_number
          IMPORTING
            htype     = lv_htype.
        IF lv_htype NE 'NUMC'.
           Raise an error here...
        ENDIF.

  • Functionality / modules currently available in MySAP for asset tracking.

    Hi All,
    We have a new requirement in the asset accounting. If any one have come accross can you let me know the feasibility and the process.
    1.Functionality / modules currently available in MySAP for asset tracking.
    2.Could MySAP support data input from other external devices e.g. scanner.
    3.What kind of asset level info is stored in MySAP and how they are modified along the asset life cycle
    Thanks nd Regards
    Srihari Bolla

    Yes this is possible.
    In the asset itself you have the fields Last inventory on and Include asset in inventory list
    From SAP you can print barcodes (asset and asset sub number) that you can put on your assets TC S_ALR_87010137 - Bar Codes . There is a standard SAP script for this, but you can create your own one.
    The date you want to use for your tracking you can get ot ouf the table ANLA
    For all the barcode's reader there is software that can create a file. This file you upload with an LSMW in SAP that updates the field Last inventory on.

  • Function module to determine the date for the nth weekday of the mth month

    Hey folks,
    Is there a function module which determines the date for the mth weekday of the nth month in the pth year.
    For instance, if I input 2nd thursday of the 4th month in 2008, it should return me, 04/10/2008  (MM/DD/YYYY).
    Thanks and Best Regards,
    Puja.

    Hi Ravi,
    Hadn't been able to work on this lately...You solution was quite close, but did not work for a few scenarios....I tweaked the logic a bit to take care of them as well...
    So here goes the code:
    ================================================
      DATA first_day_of_month TYPE datum.
      DATA day TYPE p.
      CONCATENATE year month '01' INTO first_day_of_month.
      CALL FUNCTION 'DAY_IN_WEEK'
        EXPORTING
          datum = first_day_of_month
        IMPORTING
          wotnr = day.
      DATA day_number TYPE numc2.
      IF day = weekday.
        IF recur = 1.
          DATA ls_date(10) TYPE c.
          CONCATENATE month '/01/' year INTO ls_date.
          CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
            EXPORTING
              date_external                  = ls_date
           IMPORTING
             date_internal                  = date.
        ELSE.
          day_number =  ( ( recur - 1 ) * 7 )  + 1.
        ENDIF.
      ELSEIF day < weekday.
        day_number = ( ( recur - 1 ) * 7 ) + ( weekday - day ) + 1.
      ELSE.
        day_number = ( ( recur - 1 ) * 7 ) + ( 7 - day ) + weekday + 1.
      ENDIF.
      IF date IS INITIAL.
        CONCATENATE year month day_number INTO date.
      ENDIF.
    ====================================
    There still could be some loopholes in this....am not sure....but it sure did seem to work for a couple of random checks that I performed.
    Brownie points to you for giving me a direction.
    Thanks,
    Puja.

  • Function module WWW_ALV_CALL is not released for the Internet

    Hi
    I am facing this error Function module WWW_ALV_CALL is not released for the Internet and Only user SAP can release the function module.
    Best Regards
    GAGAN

    hi,
    This Web based calls are not available anymore in Netweaver 2004s/7.0. 
    More information in SAP-Note: 910202
    Hope this helps
    regards
    Tobias

Maybe you are looking for