Function Module for F4 Help for stext ( table Hrp000 ) type field

Hello all,
I have defined one selection parameter as "Event_NAME FOR HRP1000-STEXT" .
But while running the program, system does not provide any drop down for Event_Name,just displaying it as a text field. I wanted a drop down that contains all entries of STEXT in Hrp1000.
For that I have written following code to make drop down available for event name in selection screen.The code is working fine.But the issue is that i can just select one value from the list on selection screen.I need multiple selections.How can i do that??
PARAMETERS : EV_NAME LIKE HRP1000-STEXT AS LISTBOX VISIBLE LENGTH 50.
PARAMETERS : EV_GRP LIKE HRP1000-STEXT AS LISTBOX VISIBLE LENGTH 50.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR EV_NAME.
SELECT STEXT FROM HRP1000 INTO TABLE F4_EV_NAME WHERE OTYPE = 'E'.
SORT  F4_EV_NAME BY EV_NAME.
DELETE ADJACENT DUPLICATES FROM F4_EV_NAME.
LOOP AT F4_EV_NAME.
LWA_VRM2-KEY = F4_EV_NAME-EV_NAME.
APPEND LWA_VRM2 TO L_VRM_VALUES2.
ENDLOOP.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = 'EV_NAME'
VALUES = L_VRM_VALUES2
EXCEPTIONS
ID_ILLEGAL_NAME = 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.
For Event Group*************
AT SELECTION-SCREEN ON VALUE-REQUEST FOR EV_GRP.
SELECT STEXT FROM HRP1000 INTO TABLE F4_EV_GRP WHERE OTYPE = 'L'.
SORT  F4_EV_GRP BY EV_GRP.
DELETE ADJACENT DUPLICATES FROM F4_EV_GRP.
LOOP AT F4_EV_GRP.
LWA_VRM3-KEY = F4_EV_GRP-EV_GRP.
APPEND LWA_VRM3 TO L_VRM_VALUES3.
ENDLOOP.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = 'EV_GRP'
VALUES = L_VRM_VALUES3
EXCEPTIONS
ID_ILLEGAL_NAME = 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.
Regards,
Aisha Ishrat
ICI Pakistan Ltd.

i have done this as following code:it appears as a range selection parameter but no options available in 2 drop downs.
any replies??
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-ft2.
SELECT-OPTIONS :EV_NAME FOR HRP1000-STEXT,
SELECTION-SCREEN END OF BLOCK b2.
AT SELECTION-SCREEN ON EV_NAME.
SELECT STEXT FROM HRP1000 INTO TABLE F4_EV_NAME WHERE OTYPE = 'E'.
SORT  F4_EV_NAME BY EV_NAME.
DELETE ADJACENT DUPLICATES FROM F4_EV_NAME.
LOOP AT F4_EV_NAME.
LWA_VRM2-KEY = F4_EV_NAME-EV_NAME.
APPEND LWA_VRM2 TO L_VRM_VALUES2.
ENDLOOP.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = 'EV_NAME'
VALUES = L_VRM_VALUES2
EXCEPTIONS
ID_ILLEGAL_NAME = 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.

Similar Messages

  • Function module to get PPM for given product and/or location

    Hi,
    I want to check whether any PPM is existing for given product, location.which function module i can use for the same.

    There is a BAPI that might help - BAPI_PPMSRVAPS_GETLIST which has product and location selection criteria.
    Regards
    Laurence

  • Generic datasource by function module to fetch data from multiple tables?

    I'm writing a function module to fetch price, for generic datasource.
    At first, extract test is OK. But InfoPackage never stop  when loading data to PSA in BW.
    And I find the example codes:
         OPEN CURSOR WITH HOLD S_CURSOR FOR
          SELECT (S_S_IF-T_FIELDS) FROM SFLIGHT
                                   WHERE CARRID  IN L_R_CARRID AND
                                         CONNID  IN L_R_CONNID.
        ENDIF.                             "First data package ?
    * Fetch records into interface table.
    *   named E_T_'Name of extract structure'.
        FETCH NEXT CURSOR S_CURSOR
                   APPENDING CORRESPONDING FIELDS
                   OF TABLE E_T_DATA
                   PACKAGE SIZE S_S_IF-MAXSIZE.
        IF SY-SUBRC <> 0.
          CLOSE CURSOR S_CURSOR.
          RAISE NO_MORE_DATA.
        ENDIF.
        S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
      ENDIF.
    There using Cursor to fetch data package by package, and raise exception NO_MORE_DATA to stop the loading process.
    Now I fetch data from multiple tables, I don't think I can use Cursor.
    Then How can I handle this?  
    Thanks a lot.

    Thanks
    IF IT_999[] IS INITIAL.
        SELECT A~KNUMH A~MATNR A~KSCHL VKORG VTWEG A~DATBI A~DATAB KBETR KMEIN KPEIN C~MTART APPENDING CORRESPONDING FIELDS OF
          TABLE TP_DATA
            FROM A999 AS A
              INNER JOIN KONP AS B
                  ON A~KNUMH = B~KNUMH
              INNER JOIN MARA AS C
                 ON A~MATNR = C~MATNR
    *          FOR ALL ENTRIES IN IT_999
                    WHERE
    *      A~KNUMH = IT_999-KNUMH  AND
           ( ( A~KSCHL = 'ZPRC' AND VKORG = 'Z000' AND VTWEG = 'Z1' ) OR
                          ( A~KSCHL = 'ZPRD' AND VKORG = 'A000' AND VTWEG = 'Y3' ) ) AND
    *                      A~DATBI >= SY-DATUM AND
                          LOEVM_KO = ''.
        SELECT A~KNUMH A~MATNR A~KSCHL VKORG VTWEG A~DATBI A~DATAB KBETR AS KHETR  KMEIN KPEIN C~MTART APPENDING CORRESPONDING FIELDS OF
          TABLE TP_DATA
            FROM A999 AS A
              INNER JOIN KONP AS B
                  ON A~KNUMH = B~KNUMH
              INNER JOIN MARA AS C
                 ON A~MATNR = C~MATNR
    *          FOR ALL ENTRIES IN IT_999
                    WHERE
    *      A~KNUMH = IT_999-KNUMH AND
          A~KSCHL = 'ZPR3' AND A~VKORG = 'I000' AND
    *                      DATBI >= SY-DATUM AND
                          LOEVM_KO = ''.
      ENDIF.
      IF IT_997[] IS INITIAL.
        SELECT A~KNUMH A~MATNR A~KSCHL VTWEG A~DATBI A~DATAB KBETR AS KHETR KMEIN KPEIN C~MTART APPENDING CORRESPONDING FIELDS OF
          TABLE TP_DATA
            FROM A997 AS A
              INNER JOIN KONP AS B
                  ON A~KNUMH = B~KNUMH
              INNER JOIN MARA AS C
                 ON A~MATNR = C~MATNR
    *          FOR ALL ENTRIES IN IT_997
                    WHERE
    *      A~KNUMH = IT_997-KNUMH      AND
          A~KSCHL = 'ZPRA' AND VTWEG = 'Y1' AND
    *                      DATBI >= SY-DATUM AND
                      LOEVM_KO = ''.
      ENDIF.
      IF IT_996[] IS INITIAL.
        SELECT A~KNUMH A~MATNR A~KSCHL A~DATBI A~DATAB KBETR AS KHETR KMEIN KPEIN C~MTART APPENDING CORRESPONDING FIELDS OF
           TABLE TP_DATA
             FROM A996 AS A
               INNER JOIN KONP AS B
                   ON A~KNUMH = B~KNUMH
               INNER JOIN MARA AS C
                  ON A~MATNR = C~MATNR
    *          FOR ALL ENTRIES IN IT_996
                    WHERE
    *      A~KNUMH = IT_996-KNUMH AND
          A~KSCHL = 'ZPRB' AND
    *                       DATBI >= SY-DATUM AND
          LOEVM_KO = ''.
      ENDIF.
      SELECT   MATNR     "u7269u6599u53F7u7801
               MEINH     "u4ED3u50A8u5355u4F4Du7684u5907u7528u8BA1u91CFu5355u4F4D
               UMREZ     "u57FAu672Cu8BA1u91CFu5355u4F4Du8F6Cu6362u5206u5B50
               UMREN     "u8F6Cu6362u4E3Au57FAu672Cu8BA1u91CFu5355u4F4Du7684u5206u6BCD
          FROM MARM
          INTO CORRESPONDING FIELDS OF TABLE IT_MARM
           FOR ALL ENTRIES IN TP_DATA
         WHERE MATNR = TP_DATA-MATNR AND  MEINH = TP_DATA-KMEIN.
      LOOP AT TP_DATA.
        IF TP_DATA-KPEIN NE 0.
          TP_DATA-KBETR =  TP_DATA-KBETR / TP_DATA-KPEIN.
          TP_DATA-KHETR =  TP_DATA-KHETR / TP_DATA-KPEIN.
        ENDIF.
        IF TP_DATA-KSCHL = 'ZPRA'.
    *       TP_DATA-MEINH = 'ZI'.
    *      TP_DATA-KSCHL = 'B4'.
          IF TP_DATA-KMEIN = 'ZI'.
            TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
          ELSE.
            READ TABLE IT_MARM INTO WA_MARM1 WITH KEY MATNR = TP_DATA-MATNR MEINH = TP_DATA-KMEIN.
    *           READ TABLE IT_MARM INTO WA_MARM2 WITH KEY MATNR = TP_DATA-MATNR MEINH = 'CT'.
            TP_DATA-KHETR = TP_DATA-KHETR * WA_MARM1-UMREN / WA_MARM1-UMREZ.
    *           * WA_MARM2-UMREZ / WA_MARM2-UMREN.
            TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
          ENDIF.
        ELSEIF TP_DATA-KSCHL = 'ZPRB'.
    *      TP_DATA-KSCHL = 'L0'.
    *       TP_DATA-MEINH = 'ZI'.
          IF TP_DATA-KMEIN = 'ZI'.
            TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
          ELSE.
            READ TABLE IT_MARM INTO WA_MARM1 WITH KEY MATNR = TP_DATA-MATNR MEINH = TP_DATA-KMEIN.
    *           READ TABLE IT_MARM INTO WA_MARM2 WITH KEY MATNR = TP_DATA-MATNR MEINH = 'BAG'.
            TP_DATA-KHETR = TP_DATA-KHETR * WA_MARM1-UMREN / WA_MARM1-UMREZ.
    *           * WA_MARM2-UMREZ / WA_MARM2-UMREN.
            TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
          ENDIF.
        ELSEIF TP_DATA-KSCHL = 'ZPRC' OR TP_DATA-KSCHL = 'ZPRD'.
    *       TP_DATA-MEINH = 'ZI'.
          IF TP_DATA-KMEIN = 'ZI'.
            TP_DATA-KHETR = TP_DATA-KBETR * '1.17'.
          ELSE.
            READ TABLE IT_MARM INTO WA_MARM1 WITH KEY MATNR = TP_DATA-MATNR MEINH = TP_DATA-KMEIN.
    *           READ TABLE IT_MARM INTO WA_MARM2 WITH KEY MATNR = TP_DATA-MATNR MEINH = 'WZI'.
            TP_DATA-KBETR = TP_DATA-KBETR * WA_MARM1-UMREN / WA_MARM1-UMREZ.
    *           * WA_MARM2-UMREZ / WA_MARM2-UMREN.
            TP_DATA-KHETR = TP_DATA-KBETR * '1.17'.
          ENDIF.
        ELSEIF TP_DATA-KSCHL = 'ZPR3'.
    *      TP_DATA-KSCHL = 'B2'.
          IF TP_DATA-KMEIN = 'ZI'.
            TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
          ELSE.
            READ TABLE IT_MARM INTO WA_MARM1 WITH KEY MATNR = TP_DATA-MATNR MEINH = TP_DATA-KMEIN.
    *           READ TABLE IT_MARM INTO WA_MARM2 WITH KEY MATNR = TP_DATA-MATNR MEINH = 'BAG'.
            TP_DATA-KHETR = TP_DATA-KHETR * WA_MARM1-UMREN / WA_MARM1-UMREZ.
    *           * WA_MARM2-UMREZ / WA_MARM2-UMREN.
            TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
          ENDIF.
        ENDIF.
        TP_DATA-MEINH = '01'.
        MODIFY TP_DATA.
    E_T_DATA-MATNR =   TP_DATA-MATNR.
    E_T_DATA-KSCHL =   TP_DATA-KSCHL.
    E_T_DATA-KHETR =   TP_DATA-KHETR.
    E_T_DATA-KBETR =   TP_DATA-KBETR.
    E_T_DATA-KMEIN =   TP_DATA-KMEIN.
    E_T_DATA-DATAB =   TP_DATA-DATAB.
    E_T_DATA-DATBI =   TP_DATA-DATBI.
    APPEND E_T_DATA.
        CLEAR WA_MARM1.
        CLEAR WA_MARM2.
      ENDLOOP.
    Edited by: Shen Peng on Oct 20, 2010 10:09 AM

  • FM for F4 help for presentation server path

    hi Experts,
    FM  for F4 help for presentation server path .
    and also for download to the presentation server.
    Regards,
    Amit

    Amit,
    PARAMETER: pfile LIKE rlgrap-filename OBLIGATORY.
    CALL FUNCTION 'F4_FILENAME'
       EXPORTING
         program_name        = syst-cprog
         dynpro_number       = syst-dynnr
    *   FIELD_NAME          = ' '
       IMPORTING
         file_name           = pfile.
    and use gui_download for download to presentation server:
    CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
              filename              = _filename
              filetype              = 'ASC'
              append                = l_append
              trunc_trailing_blanks = space
              write_lf              = l_write_lf
    ** here we know that we are working with GUI (not batch process) so we can ask user,
    ** if he is really sure to overwrite file in case of overwriting
    *          confirm_overwrite     = l_confirm_overwrite
              confirm_overwrite     = space
            TABLES
              data_tab              = lt_header
            EXCEPTIONS
              error_message         = 98
              OTHERS                = 99.
    Amit.

  • Function Module to update Characteristic Value (AUSP table entry)

    Looking for a function module/BAPI to update a characteristic value (AUSP table entry).
    This is for a material master Material classification value, not a Variant Config value that I need to update.
    Anybody have one?  I have one that will find the value, but not change it.
    Thanks.

    That wasn't it, but it gave me the one piece I was missing.
    Answer is:
    Function Module "CLAE_CLASSIFY_OBJECT"
    In CHANGE_KSSK
    M = 0
    KLA = (Class Type)
    OBJEK = (Material Number for the Material Characteristic being changed)
    OBTAB = MARA
    CLASS = (Class Name with Characteristic to be changed)
    S = 1
    S = (blank)
    AENNR = (EC Change Number or Blank)
    DATUV = (Today's Date or date for change)
    C = "X"
    In CHANGE_AUSP
    OBJEK = (Material Number for the Material Characteristic being changed)
    ATINN = (Chararacteristic to be changed)
    M = 0
    KLA = (Class Type)
    ATWRT = (New Value for Characteristic)
    C = X

  • Function Module to Make Help on Your Field

    Hi,
    Is there any FM to Make Help on Field?
    Thanks

    Hi,
    You can do this by two way:
    1. Make a help by using SE11 & attach it to your field like this 'parameters abc like zstudent-name matchcode object id = search help name'
    2. Use Function module to make help on your field by using this coding.
    DATA: lc_vbeln      LIKE vbrk-vbeln,
          ltab_fields LIKE help_value OCCURS 0 WITH HEADER LINE,
          BEGIN OF ltab_values OCCURS 0,
            feld(40) TYPE c,
          END OF ltab_values.
    **&      Form  HELP_CHECK
          text
    FORM help_check.
    *-- Set up fields to retrieve data
      ltab_fields-tabname    = 'VBRK'.
      ltab_fields-fieldname  = 'VBELN'.
      ltab_fields-selectflag = 'X'.
      APPEND ltab_fields.
      ltab_fields-tabname    = 'VBRK'.
      ltab_fields-fieldname  = 'FKDAT'.
      ltab_fields-selectflag = space.
      APPEND ltab_fields.
    *-- Fill values
      SELECT * FROM vbrk WHERE kunag = 'RICO0US'.
        ltab_values-feld = vbrk-vbeln.
        APPEND ltab_values.
        ltab_values-feld = vbrk-fkdat.
        APPEND ltab_values.
      ENDSELECT.
      CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'
        EXPORTING
          fieldname                 = 'VBELN'
          tabname                   = 'VBRK'
          title_in_values_list      = 'Select a value'
        IMPORTING
          select_value              = pr_vbeln
        TABLES
          fields                    = ltab_fields
          valuetab                  = ltab_values
        EXCEPTIONS
          field_not_in_ddic         = 01
          more_then_one_selectfield = 02
          no_selectfield            = 03.
    ENDFORM.                    "fiscal_year
    End of Coding
    Make this coding according to your program.
    Reward if helpful..
    Varishtah.

  • Exceptions in function module.... for beginner......

    Dear all experts,
    I am new to ABAP. 
    Can anybody please tell, how to use the exceptions in function module ?
    and if any exception happens, then how to link some messages to that exceptions?
    I will also like to know, how to create those messages ?
    <b>Can anybody please illustrate with help of example, so that a beginner will be able to understand. ?</b>
    <b>eg,</b> i am adding two numbers in function module, and if any one passing number is negative, then i need to raise exception with message please do not enter -ve numbers for addition.
    your help will be surely, rewarded with points.
    waiting for reply.
    Regards & Thanks
    Vinay.

    hi..
    Raising Exceptions
    There are two ABAP statements for raising exceptions. They can only be used in function modules:
    RAISE <except>.
    and
    MESSAGE..... RAISING <except>.
    The effect of these statements depends on whether the calling program handles the exception or not. If the name <except> of the exception or OTHERS occurs in the EXCEPTIONS addition of the CALL FUNCTION statement, the exception is handled by the calling program.
    If the calling program does not handle the exception
    The RAISE statement terminates the program and switches to debugging mode.
    The MESSAGE ..... RAISING statement display the specified message. How the processing continues depends on the message type.
    If the calling program handles the exception, both statements return control to the program. No values are transferred. The MESSAGE ..... RAISING statement does not display a message. Instead, it fills the system fields SY-MSGID, SY-MSGTY, SY-MSGNO, and SY-MSGV1 to SY-MSGV4.
    Source Code of READ_SPFLI_INTO_TABLE
    The entire source code of READ_SPFLI_INTO_TABLE looks like this:
    FUNCTION READ_SPFLI_INTO_TABLE.
    ""Local interface:
    *"       IMPORTING
    *"             VALUE(ID) LIKE  SPFLI-CARRID DEFAULT 'LH '
    *"       EXPORTING
    *"             VALUE(ITAB) TYPE  SPFLI_TAB
    *"       EXCEPTIONS
    *"              NOT_FOUND
      SELECT * FROM SPFLI INTO TABLE ITAB WHERE CARRID = ID.
      IF SY-SUBRC NE 0.
        MESSAGE E007(AT) RAISING NOT_FOUND.
      ENDIF.
    ENDFUNCTION.
    The function module reads all of the data from the database table SPFLI where the key field CARRID is equal to the import parameter ID and places the entries that it finds into the internal table SPFLI_TAB. If it cannot find any entries, the exception NOT_FOUND is triggered using MESSAGE...RAISING. Otherwise, the table is passed to the caller as an exporting parameter.
    Also check these links
    http://help.sap.com/search/highlightContent.jsp
    http://help.sap.com/search/highlightContent.jsp
    http://help.sap.com/search/highlightContent.jsp
    regards,
    veeresh

  • Function module to find days for ROUTE

    Hi Guys
    i want to know which function module or code
    will help me in fetching day's for route,for example
    you can get route from table vbap ,i want to know,how
    many day's is assign for a given route

    Hi,
    Go to the Table <b>TVRO</b> and check it.
    Regards
    vijay

  • Function module to retain data for a given period.

    Hi all,
    This is my requirement:
    I have a selection screen on which a specific number of months is entered. Using the FM 'FI_PERIOD_DETERMINE' and passing the current date to it, I'll be fetching the current fiscal year and fiscal period. I got to retain the data maintained in a custom table for that many number of months as is specified on the selection screen starting backwards from the current fiscal period obtained after the FM call. And thereby deleting all the data maintained in the same table prior to it.
    Is there any function module to do so..... If not, kindly let me know the procedure to follow in order to obtain this requirements
    Regards,
    Jean Pearl D'souza

    Hi,
    Use FM HR_GB_PERIOD_DATES
    Payroll area is mandatry.

  • Function modules (and the like) for testing Object Dependencies in PLM

    Hi all,
    I've created an upload program for characteristic values to AUSP, but I need to <b>check the object dependencies</b> (as shown in transaction CU03) before saving the data.
    I have the list of the dependencies for the characteristic in question, but how can I perform a dependency check in program code? Is there any <b>function modules</b> (and the like) which I can use?
    All helpful answers will be rewarded!
    - Mari Virik

    Thanks!
    I'm not that familiar with BAPIs, which transactions can I use to check it out? Transaction BAPI? And how do I locate it in the BAPI Explorer? How do I perform the method call?
    More points will be rewarded
    - Mari

  • Function modules (and the like) for testing Object Dependencies

    Hi all,
    I've created an upload program for characteristic values to AUSP, but I need to <b>check the object dependencies</b> (as shown in transaction CU03) before saving the data.
    I have the list of the dependencies for the characteristic in question, but how can I perform a dependency check in program code? Is there any <b>function modules</b> (and the like) which I can use?
    All helpful answers will be rewarded!
    - Mari Virik

    Hi,
    How did you solve this problem?
    I have the same.
    Thanks.

  • Function Module to Create Addresses for PM order

    We are currently using BDC process to Create addresses for PM orders. I would like use a Function Module instead of the BDC process. Can somebody point me to FM that can create ADRC record and return ADDRNO?
    Thanks Guru's

    hi,
    check this link:
    [Business Address Services|http://help.sap.com/saphelp_nw04/helpdata/EN/c8/13b237b9a9a968e10000009b38f8cf/frameset.htm]
    regards,darek

  • Function module to find total for delivey for delivery no.

    is there any function module to find total price for delivery no.

    If you want to add tax, ... conditions, you could try to read conditions (good luck).
    here it's a sample code for sales order (the table are different, but the function the same)
      DATA : is_vbak TYPE vbak ,
             is_vbap TYPE vbap .
    * Check if the sales order exist.
      SELECT SINGLE *
             INTO is_vbak
             FROM vbak
             WHERE vbeln EQ vbeln.
      IF sy-subrc NE space.
        RAISE sales_order_unknown.
      ENDIF.
    * Check if the sales order item exist.
      SELECT SINGLE *
             INTO is_vbap
             FROM vbap
             WHERE vbeln EQ vbeln
             AND   posnr EQ posnr.
      IF sy-subrc NE space.
        RAISE sales_order_item_unknown.
      ENDIF.
    * Set data.
      MOVE : is_vbak-mandt    TO isg_komk-mandt ,
             is_vbak-kalsm    TO isg_komk-kalsm ,
             is_vbak-fkara    TO isg_komk-fkart ,
             'V'              TO isg_komk-kappl ,
             is_vbak-waerk    TO isg_komk-waerk ,
             is_vbak-knumv    TO isg_komk-knumv ,
             is_vbak-vbtyp    TO isg_komk-vbtyp ,
             is_vbak-bukrs_vf TO isg_komk-bukrs ,
             is_vbak-vbeln    TO isg_komk-belnr ,
             is_vbap-posnr    TO isg_komp-kposn .
      MOVE-CORRESPONDING : is_vbak TO isg_komk ,
                           is_vbap TO isg_komp.
    * Get the KOMV table.
      CALL FUNCTION 'RV_PRICE_PRINT_ITEM'
        EXPORTING
          comm_head_i = isg_komk
          comm_item_i = isg_komp
        TABLES
          tkomv       = itg_komv
          tkomvd      = itg_komvd.
    * Get the 'Marge'.
      CALL FUNCTION 'PRICING_BUILD_XKOMV'
        EXPORTING
          i_komk           = isg_komk
          i_komp           = isg_komp
          calculation_type = 'E'
        TABLES
          tkomv            = itg_komv
          e_xkomv          = itg_komv2
        EXCEPTIONS
          OTHERS           = 2.

  • Function module to create messages for Purchase order

    Hi All,
    I am writing a BDC and recording steps to create Messages for a Purchase order(ME22N).
    For an existing PO, go to Messages and create a message with output type for EDI. Already there are existing Output types for Print and Fax,
    How do I default my cursor at the 3rd record if Print, and Fax are already there, and when I run this BDC for several PO's How do I know how many messages are there and where to place cursor to create message for EDI.
    Is there any Function module or Bapi available wherein I can directly give the PO number and create the message.
    Please suggest
    Thanks-

    I have a list of PO's in the internal table, I need to put a loop and for each PO, I need to create a message with output type for EDI. as I am not sure if there are already messages available for Print, Fax, and Email. I have an issue placing the cursor on the Messages window.
    So i thought if there is any function module to create message without going to message window, I can avoid those complications.
    How to do this. any suggestions?
    Thanks-

  • Need function module or Bapi name for uploading CJ02 tcode

    Hi All,
    When i am trying to record the data for TCODE : CJ02 i need to enter the project Definition and enter the WBS element it takes me to the screen then i should select the WBS element and attach a file for that selected WBS element . The option for me to attach the attachment of file will be available on the application area(Services for the Object).
    Now the problem when i try to do recording in SHDB this option like create attachement is not visible in the recodring . Kindly suggest me what can i do such that i attach the file for the particular project def and WBS element.
    Either suggest any function module or other procedure .......
    Regards,
    Sana.
    Edited by: Misbah Sultana on Nov 5, 2009 10:33 AM

    Hi,
    try using BAPI
    BAPI_PROMO_CHANGESITEPLANNING
    or
    BAPI_PLANNEDORDER_CHANG
    THANKS
    ravi

Maybe you are looking for

  • Remote control and NAL screen

    We use NAL screen only here for the students. The problem we are having is if a student uses the option Close all programs and log on as a different user. The remote will not work again till the computer is shut down and restarted. This is also true

  • LV reports

    I am using LV 5.1.1 on a Win 9x platform. I am trying to come up with a way to let users save reports easily from Labview. I have stayed away from the LV report VI's because they do not support graphics. What I have come up with is less than optimal

  • Changing account name

    I set my avatar name last year for something because I thought I wouldn't use the discussions again, but now I am so is there a way to change my avatar?

  • Event Propagation again. Sorry

    Hi guys, I vave a pretty simple app to test how the propagation works.I do not undestand, why the propagation on the stage 3 (bubbling) works in the oppsit way than it should work. Here is my code: <?xml version="1.0" encoding="utf-8"?> <mx:Applicati

  • HT204380 facetime will not activate on iphone 5

    Iphone 5 will not activate facetime. Wifi is turned on and facetime is turned on. It only says waiting for activation. When you connect with a contact that has facetime and click on facetime it just keeps saying activating.