How to use read_text function module

Hi how to use read_text function module to read purchase order header text .what are all tht things to pass in ID,Name and Object
thanks,
Mahe

Dear,
Use below code.
DATA:IT_LINE LIKE TLINE OCCURS 0 WITH HEADER LINE,
V_TDNAME LIKE THEAD-TDNAME.
V_TDNAME = PO_NUMBER.
CALL FUNCTION 'READ_TEXT'
  EXPORTING
*   CLIENT                        = SY-MANDT
    ID                            = 'F01'
    LANGUAGE                      = 'EN'
    NAME                          = V_TDNAME
    OBJECT                        = 'EKKO'
  TABLES
    LINES                         = IT_LINE.
Thanks and Regards,

Similar Messages

  • How to use these function modules

    Hi all,
    can anyone help that how to use these Function modules to update the status of a task, what are all the inputs i required to proceed
    1. FC_USER_AUTHORITY_CHECK
    <b>2. FC_USER_STATUS_CHECK
    3. FC_USER_STATUS_UPDATE</b>
    4. FC_USER_GET_CACTI
    5. FC_USER_CHECK_FOR_OUTPUT
    Thanks in Advance
    Ganesh

    Hi Rob,
    thanks for ur reply,
    but they are not clear what they are meant to be, I understood there are some flags needed to run the Function Modules 2 & 3 which are in bold...
    but how do i populate them.. i am not getting that..
    thanks
    ganesh

  • How to use BAPI_MATERIAL_AVAILABILITY Function Module at batch level?

    How to use BAPI_MATERIAL_AVAILABILITY FM to check material available at batch level?
    And another question is what's the meaning of 'CHECK_RULE' in this FM. Thanks!

    Field name : PRREG
    fcheck more details on  f1 help...
    check_group defines the checking procedure to be used for  availability check in individual applications.
    along with the checkg group, checking rule  specifies the final procedure for chkg..
    eg:
    ST  for  stock transport order
    AQ for SD order project srock
    also chk this help doc.
    http://help.sap.com/saphelp_470/helpdata/en/cf/70124adf2d11d1b55e0000e82de178/content.htm
    search the forum for sample code..
    How to use BAPI_MATERIAL_AVAILABILITY Function Module....

  • How to use BAPI_MATERIAL_AVAILABILITY Function Module....

    Hi Experts,
    I want to know actual free available quantity (ATP Qty.) for mass materials,
    How to use BAPI_MATERIAL_AVAILABILITY function module ?
    I have select all material from MARA and inserted in itab.
    LOOP AT ITAB.
    CALL FUNCTION 'BAPI_MATERIAL_AVAILABILITY'
      EXPORTING
        PLANT                    =
        MATERIAL                 =
        UNIT                     =
      CHECK_RULE               =
      STGE_LOC                 =
      BATCH                    =
      CUSTOMER                 =
      DOC_NUMBER               =
      ITM_NUMBER               =
      WBS_ELEM                 =
      STOCK_IND                =
      DEC_FOR_ROUNDING         =
      DEC_FOR_ROUNDING_X       =
      READ_ATP_LOCK            =
      READ_ATP_LOCK_X          =
    IMPORTING
      ENDLEADTME               =
      AV_QTY_PLT               =
      DIALOGFLAG               =
      RETURN                   =
      TABLES
        WMDVSX                   =
        WMDVEX                   =
    I dont know how to use it.
    pl. guide us.
    Yusuf

    Hi,
           data:  iwmdvsx type table of bapiwmdvs with header line,
           iwmdvex type table of bapiwmdve with header line.
    parameters: p_matnr type mara-matnr,
                p_werks type marc-werks,
                p_meins type mara-meins.
    call function 'BAPI_MATERIAL_AVAILABILITY'
      exporting
        plant            = p_werks
        material         = p_matnr
        unit             = p_meins
      CHECK_RULE       =
      STGE_LOC         =
      BATCH            =
      CUSTOMER         =
      DOC_NUMBER       =
      ITM_NUMBER       =
      WBS_ELEM         =
      STOCK_IND        =
    IMPORTING
      ENDLEADTME       =
      AV_QTY_PLT       =
      DIALOGFLAG       =
      RETURN           =
      tables
        wmdvsx           = iwmdvsx
        wmdvex           = iwmdvex.
    check sy-subrc = 0.
    Text
    ATP information
    Functionality
    Using this function module, you can determine the receipt quantity still available for a particular material in a certain plant according to ATP logic (MRPII).
    The availability check is carried out on transferring the material number, the plant and the input table (WMDVSX). The scope of the check, that is, which stocks, receipts and issues are to be included in the check is defined by the combination of checking group (material master) and cheking rule. In the function module, the system uses the checking rule defined in Sales & Distribution (A). You can overrule this checking rule by using an interface or a user-exit (exit_saplw61v_001). A similar procedure is also valid for the plant parameters. The customer number in the user-exit means that the plant selection can be controlled via the customer. If no plant parameters are given via the interface, the system uses the parameter 'WRK' saved in the user's fixed values.
    The results of the availability check are recorded in the output table (WMDVEX). This table contains dates and available receipt quantities (ATP quantities). The results of the check depends on the following entries:
    If no date and no quantity is transferred, the system displays the ATP situation from today's date into the future as the result.
    If only a date and no quantity is transferred, the system displays the ATP situation from the corresponding date as the result.
    If both a date and a quantity are transferred, the system calculates the availability situation for the quantity specified.
    In the last two cases, the parameter 'DIALOGFLAG' is supplied. This can result in the following:
    ' ' (blank)   <=> quantity completely available
    'X'           <=> only partial quantity available or not available at
                      all
    'N'           <=> Material not included in the availability check
                      (Material not relevant to the availability check)
    The system also displays the end of the replenishment lead time (ENDLEADTME).
    regards

  • How to use SO_OBJECT_SEND function module

    Hi friends,
       how to use SO_OBJECT_SEND function module in 4.0B Server .

    hi
    good
    check this code
    REPORT ZTSAPMAIL.
    DATA: X_OBJECT_TYPE LIKE SOOD-OBJTP.
    DATA: BEGIN OF X_OBJECT_HD_CHANGE.
    INCLUDE STRUCTURE SOOD1.
    DATA: END OF X_OBJECT_HD_CHANGE.
    DATA: BEGIN OF X_OBJCONT OCCURS 10.
    INCLUDE STRUCTURE SOLI.
    DATA: END OF X_OBJCONT.
    DATA: BEGIN OF X_OBJHEAD OCCURS 0.
    INCLUDE STRUCTURE SOLI.
    DATA: END OF X_OBJHEAD.
    DATA: BEGIN OF RAW_HEAD.
    INCLUDE STRUCTURE SORH.
    DATA: END OF RAW_HEAD.
    DATA: BEGIN OF X_RECEIVERS OCCURS 0.
    INCLUDE STRUCTURE SOOS1.
    DATA: END OF X_RECEIVERS.
    PARAMETERS: RECEIVER LIKE X_RECEIVERS-RECNAM. " Name
    *BUILD MESSAGE HEADER
    MOVE 'Sort field goes here' TO X_OBJECT_HD_CHANGE-OBJSRT. " Sort field
    MOVE 'Name of the object goes here' TO X_OBJECT_HD_CHANGE-OBJNAM. " Name
    MOVE 'Document title goes here' TO X_OBJECT_HD_CHANGE-OBJDES. " Title
    MOVE 'F' TO X_OBJECT_HD_CHANGE-OBJSNS. " Functional OBJECT
    MOVE 'E' TO X_OBJECT_HD_CHANGE-OBJLA. " Language
    Object type of the new document
    MOVE 'RAW' TO X_OBJECT_TYPE.
    CLEAR X_OBJCONT.
    MOVE 'Contents of mail' TO X_OBJCONT-LINE.
    APPEND X_OBJCONT.
    CLEAR X_OBJCONT-LINE. APPEND X_OBJCONT.
    MOVE 'More contents' TO X_OBJCONT-LINE.
    APPEND X_OBJCONT.
    MOVE 'Still more contents'
    to x_objcont-line.
    APPEND X_OBJCONT.
    MOVE ' ' TO X_OBJCONT-LINE.
    APPEND X_OBJCONT.
    Specific header (Dependent on the object type, here RAW)
    REFRESH X_OBJHEAD.
    DESCRIBE TABLE X_OBJCONT LINES RAW_HEAD-RAWSIZ.
    MOVE RAW_HEAD TO X_OBJHEAD.
    APPEND X_OBJHEAD.
    *RECEIVERS table
    CLEAR X_RECEIVERS.
    REFRESH X_RECEIVERS.
    MOVE RECEIVER TO X_RECEIVERS-RECNAM. " Name
    MOVE 'B' TO X_RECEIVERS-RECESC. " Receiver type
    MOVE 'X' TO X_RECEIVERS-SNDCP. " Send as a copy
    MOVE 'X' TO X_RECEIVERS-SNDEX. " EXPRESS DOCUMENT
    APPEND X_RECEIVERS.
    CALL FUNCTION 'SO_OBJECT_SEND'
    EXPORTING
    folder_id = 'OUTBOX'
    forwarder = x_forwarder
    object_fl_change = x_object_fl_change
    OBJECT_HD_CHANGE = X_OBJECT_HD_CHANGE
    object_id = x_object_id
    OBJECT_TYPE = X_OBJECT_TYPE
    OUTBOX_FLAG = 'X'
    OWNER = SY-UNAME
    store_flag = x_store_flag
    importing
    object_id_new = x_object_id_new
    sent_to_all = x_sent_to_all "May need to use
    TABLES
    OBJCONT = X_OBJCONT
    OBJHEAD = X_OBJHEAD
    objpara = x_objpara
    objparb = x_objparb
    RECEIVERS = X_RECEIVERS.
    reward point if hlepful.
    thanks
    mrutyun^

  • How to use ADD_MAINTAIN_COMPLETE function module

    how to use ADD_MAINTAIN_COMPLETE function module
    please help me.
    by using the above function module
    how can i change the ADRT table REMARK field

    how to use ADD_MAINTAIN_COMPLETE function module
    please help me.
    by using the above function module
    how can i change the ADRT table REMARK field

  • How to use the function module 'HR_ES_FEATURE_BACKFIELD'

    Hi,
    How to use the function module 'HR_ES_FEATURE_BACKFIELD'?
    I need the usage from both technical as well as functional point of view.
    What is the use of this function module and technically how it is to be used to retrieve a feature for a particular employee.

    hey iam from functional side can u be little bit clear of that feature
    thanks
    sikindar

  • How to use Check Function Module???

    Hi Friends,
    How to use Check Function Module in Workflow???
    My requirement is to trigger the workflow at the last line item of the Material Document.
    Rewards for sure for helpful answer.
    -Satish

    Hi Satish,
    You know, the real power of forums like these is the search functionality. First you locate the correct forum, you succeeded in that and then you locate the search field and type in your question. In your case "check function module"
    I suggest you do this right away and be amazed at all of the answers about his topic. Maybe you'll even find some topic about exactly the same issue with a different solution than check function modules and on top of that you learn something this way. Talk about win-win situation
    Kind regards, Rob Dielemans

  • How to use the function module ....

    hi
    how to use the function module ssf_function_module_name in smartforms

    Hi..
    If you are using this Function module, you can get the generated function module name of smartform dynamically. It is good progrmaming practice to get the fucntion module name dynamically because there might be some problems if you are hard coding in program.
    This will return the name of the function module and then from the exporting parameters you can use the fucntion module name to pass parameters to Smartforms.
    Check this link.I am expalining here how to use this function module.
    https://wiki.sdn.sap.com/wiki/pages/pointstab/viewpageversion.action?pageId=36109&version=2
    Calling SMARTFORMS from your ABAP program
    REPORT ZSMARTFORM.
    Calling SMARTFORMS from your ABAP program.
    Collecting all the table data in your program, and pass once to SMARTFORMS
    SMARTFORMS
    Declare your table type in :-
    Global Settings -> Form Interface
    Global Definintions -> Global Data
    Main Window -> Table -> DATA
    Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
    http://sapr3.tripod.com
    TABLES: MKPF.
    DATA: FM_NAME TYPE RS38L_FNAM.
    DATA: BEGIN OF INT_MKPF OCCURS 0.
    INCLUDE STRUCTURE MKPF.
    DATA: END OF INT_MKPF.
    SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
    SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
    MOVE-CORRESPONDING MKPF TO INT_MKPF.
    APPEND INT_MKPF.
    ENDSELECT.
    At the end of your program.
    Passing data to SMARTFORMS
    call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
    formname = 'ZSMARTFORM'
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    FM_NAME = FM_NAME
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3.
    if sy-subrc <> 0.
    WRITE: / 'ERROR 1'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function FM_NAME
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    TABLES
    GS_MKPF = INT_MKPF
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5.
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    <b>Reward points if useful</b>
    Regards
    Ashu

  • How to use this function module on abap hr GET_PDSNR_RANGE

    how to use this function module on abap hr GET_PDSNR_RANGE
    thankx.

    PASS INETRNAL TABLE WITH SOME DATA TO TABELLE FOR GENERATING PDSNR SEQUENCE

  • How to use the function module /IRM/IPBB_AGREEMENT_CREATE.

    Hi all,
    Please help me how to use the function module /IRM/IPBB_AGREEMENT_CREATE.
    It is a Vistex fuction module which is used to create Sales contract in SAP-Vistex. If anyone has use the function module and do have the sample code please share it.
    Thanks.

    FORM create_agreement TABLES pt_agreement
                                           CHANGING po_agreement .
      CONSTANTS: c_strt_knumh TYPE knumh VALUE '0000000000'.
      DATA: lc_kona  TYPE /irm/s_gkona,
            lc_cbasp TYPE /irm/s_ipcbasp,
          lt_cbapr TYPE /irm/t_ipcbapr,         "Partners
          lc_cbapr TYPE /irm/s_ipcbapr,
          lt_cbadt TYPE  /irm/t_ipcbadt,        "Dates
          lc_cbadt TYPE  /irm/s_ipcbadt,
          lt_cbafs TYPE  /irm/t_ipcbafs,
          lc_cbafs TYPE  /irm/s_ipcbafs,
          lt_cbacn TYPE  /irm/t_ipcbacn,
          lc_cbacn TYPE  /irm/s_ipcbacn,
          lt_cbacl TYPE  /irm/t_ipcbacl,
          lc_cbacl TYPE  /irm/s_ipcbacl,
          lt_cbtpv TYPE  /irm/t_ipagtpv,
          lc_cbtpv TYPE  /irm/s_ipagtpv,
          lt_texts TYPE  text_lh,
          lc_texts TYPE  itclh,
          lt_cbasd TYPE  /irm/t_ipcbasd,
          lc_cbasd TYPE  /irm/s_ipcbasd,
          lc_agreement    TYPE  /irm/s_ipcbasp_doc,
          lc_e_log_number TYPE  balognr,
          lt_messages     TYPE  /irm/t_gprolog.
      DATA: lt_vake      TYPE  cond_vakevb_t,
            lc_vake      TYPE LINE OF cond_vakevb_t,
            lt_konh      TYPE  /irm/t_gkonh,
            lc_konh      TYPE LINE OF /irm/t_gkonh,
            lt_konp      TYPE  /irm/t_gkonp,
            lc_konp      TYPE LINE OF /irm/t_gkonp,
            lt_konw      TYPE  /irm/t_gkonwu,
            lc_konw      TYPE LINE OF /irm/t_gkonwu,
            lt_konm      TYPE  /irm/t_gkonmu,
            lc_konm      TYPE LINE OF  /irm/t_gkonmu,
            lt_komg      TYPE  /irm/t_gkomg_index,
            lc_komg      TYPE LINE OF /irm/t_gkomg_index,
            lt_user_data TYPE  /irm/t_gpraxfu_index,
            lc_user_data TYPE LINE OF /irm/t_gpraxfu_index.
      DATA: lc_updt(1) TYPE c.
      DATA: lc_knumh TYPE knumh.
      DATA: BEGIN OF lc_str_knumh,
             hd(2) TYPE c VALUE '$$',
             inc_num(8) TYPE c,
            END OF lc_str_knumh.
      DATA: blank_agree_key TYPE knuma VALUE '~~~~~~~~~~'.
      FIELD-SYMBOLS <konh_line> LIKE LINE OF lt_konh.
      FIELD-SYMBOLS <konp_line> LIKE LINE OF lt_konp.
      DATA: lc_rule TYPE type_key_rule.
      READ TABLE pt_agreement INTO lc_rule INDEX 1.
    SELECT SINGLE * FROM  kona
            WHERE  vkorg   = lc_rule-vkorg
            AND    vtweg   = '10'
            AND    spart   = '10'
            AND    boart   = 'ZPS1'
            AND    botext  = lc_rule-sap_agkey.
    IF sy-subrc = 0.
       lc_updt = 'U'.
    ELSE.
      lc_updt = 'I'.
    ENDIF.
      LOOP AT pt_agreement INTO lc_rule.
        MOVE sy-tabix TO lc_str_knumh-inc_num.
        CONDENSE lc_str_knumh-inc_num NO-GAPS.
        WHILE lc_str_knumh-inc_num+7(1) = ' '.
          CONCATENATE '0' lc_str_knumh-inc_num INTO lc_str_knumh-inc_num.
          CONDENSE lc_str_knumh-inc_num NO-GAPS.
        ENDWHILE.
        CONCATENATE '$$' lc_knumh INTO lc_knumh.
        MOVE lc_str_knumh TO lc_knumh.
       MOVE c_strt_knumh TO lc_knumh.
        CLEAR: lc_konh, lc_konp, lc_komg.
        MOVE: lc_rule-vkorg    TO lc_komg-komg-vkorg,
              '10'             TO lc_komg-komg-vtweg,
              '10'             TO lc_komg-komg-spart,
              p_waers          TO lc_komg-komg-waerk,
              '1300'           TO lc_komg-komg-bukrs,
              lc_rule-lifnr    TO lc_komg-komg-lifnr,
              lc_knumh         TO lc_komg-knumh,
              lc_knumh         TO lc_konh-knumh,
              lc_knumh         TO lc_konp-knumh,
              lc_rule-datab    TO lc_konh-datab,
              lc_rule-datbi    TO lc_konh-datbi.
        CASE lc_rule-tablnam.
          WHEN 'A701'.                   "Every Agreement will have a A701 rule -
            "Therefore we acn setup the header using A701
            MOVE: 'New       '  TO lc_kona-knuma,
                  lc_rule-vkorg TO lc_kona-vkorg,
                  '10'          TO lc_kona-vtweg,
                  '10'          TO lc_kona-spart,
                  'ZPS1'        TO lc_kona-boart,
                  'C'           TO lc_kona-abtyp,
                  'V'           TO lc_kona-kappl,
                  p_waers       TO lc_kona-waers,
                  lc_rule-knuma_ag TO lc_kona-abrex,
                  'ZPS2'        TO lc_kona-kobog,
                  lc_rule-datab TO lc_kona-datab,
                  lc_rule-datbi TO lc_kona-datbi,
                  lc_rule-sap_agkey TO lc_kona-botext,
                  '1300'        TO lc_kona-bukrs,
                  'I'           TO lc_kona-updkz.
            MOVE: 'New       '  TO lc_cbasp-knuma_ag,
                  'ZPS1'        TO lc_cbasp-boart_ag,
                  p_waers       TO lc_cbasp-waers,
                  'A'           TO lc_cbasp-setl_mth,
                  'B'           TO lc_cbasp-setl_typ,
                  'A2'          TO lc_cbasp-ident,
                  'E'           TO lc_cbasp-setlm,
                  'ZPDA'        TO lc_cbasp-pargr,
                  'X'           TO lc_cbasp-npric,
                  'LF'          TO lc_cbasp-stprl,
                  lc_rule-lifnr TO lc_cbasp-stpar,
                  lc_rule-contract_rev  TO lc_cbasp-rvnum,
                  'I'           TO lc_cbasp-updkz.
            CONCATENATE: blank_agree_key
                   lc_rule-lifnr        INTO lc_konh-vakey.
            MOVE: lc_rule-lifnr TO lc_konp-lifnr.
          WHEN 'A703'.
            CONCATENATE: blank_agree_key
                         lc_rule-kunnr      INTO lc_konh-vakey.
            MOVE lc_rule-kunnr TO lc_komg-komg-kunnr.
          WHEN 'A709'.
            CONCATENATE: blank_agree_key
            lc_rule-zzprodh1  lc_rule-zzprodh2  lc_rule-zzprodh3
                   lc_rule-zzprodh4  lc_rule-zzprodh5 INTO lc_konh-vakey.
            CONCATENATE: lc_rule-zzprodh1  lc_rule-zzprodh2  lc_rule-zzprodh3
                   lc_rule-zzprodh4  lc_rule-zzprodh5 INTO lc_komg-komg-prodh.
          WHEN 'A710'.
            CONCATENATE: blank_agree_key
                lc_rule-matkl   INTO lc_konh-vakey.
            MOVE lc_rule-matkl TO lc_komg-komg-matkl.
          WHEN 'A711'.
            CONCATENATE: blank_agree_key
                 lc_rule-matnr   INTO lc_konh-vakey.
            MOVE lc_rule-matnr TO lc_komg-komg-matnr.
            IF lc_rule-kschl = 'ZPPL'.
              MOVE: 'C'              TO lc_konp-krech,
                    'CAD'              TO lc_konp-konwa.
              lc_konp-kbetr = lc_rule-net_po_price * 1.
            ENDIF.
          WHEN 'A717'.
          WHEN 'A718'.
            CONCATENATE: blank_agree_key
                 lc_rule-zzextwg INTO lc_konh-vakey.
            MOVE lc_rule-zzextwg TO lc_komg-komg-zzextwg.
         WHEN 'A719'.
           CONCATENATE: blank_agree_key
                lc_rule-werks INTO lc_konh-vakey.
           MOVE lc_rule-werks TO lc_komg-komg-werks.
         WHEN 'A721'.
           CONCATENATE: blank_agree_key
                 lc_rule-kunnr lc_rule-werks INTO lc_konh-vakey.
           MOVE: lc_rule-kunnr TO lc_konp-kunnr,
                 lc_rule-kunnr TO lc_komg-komg-kunnr.
          WHEN 'A722'.
            CONCATENATE: blank_agree_key
                         lc_rule-vkbur INTO lc_konh-vakey.
            MOVE lc_rule-vkbur TO lc_komg-komg-vkbur.
          WHEN 'A724'.
            CONCATENATE: blank_agree_key
                          lc_rule-kunnr lc_rule-vkbur INTO lc_konh-vakey.
            MOVE: lc_rule-kunnr TO lc_konp-kunnr,
                  lc_rule-kunnr TO lc_komg-komg-kunnr,
                  lc_rule-vkbur TO lc_komg-komg-vkbur.
        ENDCASE.
        MOVE: 'A'                  TO lc_konh-kvewe,
              lc_rule-tablnam+1(3) TO lc_konh-kotabnr,
              lc_rule-kappl        TO lc_konh-kappl,
              lc_rule-kschl        TO lc_konh-kschl.
        REPLACE ALL OCCURRENCES OF '~' IN lc_konh-vakey WITH ' '.
        APPEND lc_konh TO lt_konh.
        CLEAR lc_konh.
    *--- Add in the KONP.Do we need to add
        MOVE: lc_rule-kappl        TO lc_konp-kappl,
              lc_rule-kschl        TO lc_konp-kschl,
              'G'                  TO lc_konp-krech.
        IF lc_rule-kschl+3(1) = '%'.
          MOVE: 'A'              TO lc_konp-krech,
                '%'              TO lc_konp-konwa.
          lc_konp-kbetr = lc_rule-rebate_perc * 1.
        ENDIF.
        APPEND lc_konp TO lt_konp. CLEAR lc_konp.
        APPEND lc_komg TO lt_komg. CLEAR lc_komg.
      ENDLOOP.
      IF  lc_updt = 'I'.
        CALL FUNCTION '/IRM/IPCB_AGREEMENT_CREATE'
          EXPORTING
          I_MESSAGES_DISPLAY        = ' '
          I_SAVE_MESSAGES           = ' '
          I_COMMIT_WORK             = 'X'
          I_CALL_FROM_WS            = ' '
            is_kona                   = lc_kona
            is_cbasp                  = lc_cbasp
            it_cbapr                  = lt_cbapr
            it_cbadt                  = lt_cbadt
            it_cbafs                  = lt_cbafs
            it_cbacn                  = lt_cbacn
            it_cbacl                  = lt_cbacl
            it_cbtpv                  = lt_cbtpv
            it_texts                  = lt_texts
            it_cbasd                  = lt_cbasd
          IMPORTING
            es_agreement              = lc_agreement
            e_log_number              = lc_e_log_number
          TABLES
            t_messages                = lt_messages
         CHANGING
          CT_VAKE                   = lt_vake
          ct_konh                   = lt_konh
          ct_konp                   = lt_konp
          CT_KONW                   = lt_konw
          CT_KONM                   = lt_konm
           ct_komg                   = lt_komg
          CT_USER_DATA              = lt_usr_data
          EXCEPTIONS
            no_documents_to_process   = 1
            no_authorization          = 2
            creation_failed           = 3
            new_pricing_not_maitained = 4
            OTHERS                    = 5.
        IF sy-subrc <> 0.
    Implement suitable error handling here
        ELSE.
          MOVE: lc_agreement-knuma_ag TO po_agreement,
                lc_agreement-knuma_ag TO lc_kona-knuma.
        ENDIF.
        APPEND LINES OF lt_messages TO gt_messages.
      ELSE.
        MOVE-CORRESPONDING kona TO lc_kona.
      ENDIF.
      LOOP AT lt_konh ASSIGNING <konh_line>.
        MOVE lc_kona-knuma TO <konh_line>-vakey+0(10).
       move '&'           to <konh_line>-knumh+0(1).
      ENDLOOP.
      LOOP AT lt_konp ASSIGNING <konp_line>.
       MOVE lc_kona-knuma TO <konp_line>-vakey+0(10).
        move '&'           to <konh_line>-knumh+0(1).
      ENDLOOP.
      lc_kona-updkz = 'U'.
      lc_cbasp-updkz = 'U'.
      CLEAR lt_messages.
      CALL FUNCTION '/IRM/IPCB_AGREEMENT_CHANGE'
        EXPORTING
        I_MESSAGES_DISPLAY      = ' '
        I_SAVE_MESSAGES         = ' '
        I_COMMIT_WORK           = 'X'
        I_INIT_DATA             = 'X'
          is_kona                 = lc_kona
          is_cbasp                = lc_cbasp
         it_cbapr                = lt_cbapr
         it_cbadt                = lt_cbadt
         it_cbafs                = lt_cbafs
         it_cbacl                = lt_cbacl
         it_cbacn                = lt_cbacn
        IT_FIELDS               =
         it_texts                = lt_texts
       IMPORTING
         e_log_number            = lc_e_log_number
         TABLES
           t_messages              = lt_messages
        CHANGING
          cs_agreement            = lc_agreement
        CT_VAKE                 = lt_vake
          ct_konh                 = lt_konh
          ct_konp                 = lt_konp
        CT_KONW                 = lt_konw
        CT_KONM                 = lt_konm
          ct_komg                 = lt_komg
        CT_USER_DATA            = lt_usr_data
        EXCEPTIONS
          no_documents_to_process = 1
          no_authorization        = 2
          change_failed           = 3
          agreement_locked        = 4
          OTHERS                  = 5.
    IF sy-subrc <> 0.
    Implement suitable error handling here
    ENDIF.
      APPEND LINES OF lt_messages TO gt_messages.
    ENDFORM.                    " CREATE_AGREEMENT

  • How to Use the Function Module 'BAPI_BUSPROCESSND_CHANGEMULTI'

    Dear Experts,
             Can anyone Explain me how to Use the Function Module 'BAPI_BUSPROCESSND_CHANGEMULTI'.My Requirement is i want to change the Partners of the Service Order.It is Very Urgent Requirement Please Help me.
    Thanks & Regards,
    Ashok.

    Hi,
    For service order you can use FM 'BAPI_ACTIVITYCRM_CHANGEMULTI' as it is much easier to use.
    Sample code is below. You can use that:
    "fill the details of partner which is
              "to be added as main partner or in place of Interaction Agent
              wa_partner_new-ref_guid = w_guid_ref.
              wa_partner_new-ref_handle = '0000000000'.
              wa_partner_new-ref_kind = 'A'.
              wa_partner_new-kind_of_entry = wa_partner-kind_of_entry.
              wa_partner_new-ref_partner_handle = '0000'.
              wa_partner_new-ref_partner_fct = 'Z_IA'.
    "wa_partner-partner_no : New partner no.
              wa_partner_new-ref_partner_no = wa_partner-partner_no.
              wa_partner_new-ref_no_type = wa_partner-ref_no_type.
              wa_partner_new-ref_display_type = wa_partner-ref_display_type.
              wa_partner_new-display_type = 'BP'.
              wa_partner_new-no_type = 'BP'.
              wa_partner_new-partner_fct = 'Z_IA'.
    "w_partner_no : Old partner no. which is to be changed
              wa_partner_new-partner_no = w_partner_no.
              wa_partner_new-mainpartner = 'X'.
              INSERT wa_partner_new INTO TABLE it_partner_new.
              wa_partner_newx-display_type = 'X'.
              wa_partner_newx-no_type = 'X'.
              wa_partner_newx-partner_fct = 'X'.
              wa_partner_newx-partner_no = 'X'.
              wa_partner_newx-mainpartner = 'X'.
              INSERT wa_partner_newx INTO TABLE it_partner_newx.
      IF it_partner_new[] IS NOT INITIAL AND it_partner_newx[] IS NOT INITIAL.
        "maintain all changes to be done
        CALL FUNCTION 'BAPI_ACTIVITYCRM_CHANGEMULTI'
          TABLES
            partner  = it_partner_new
            partnerx = it_partner_newx.
        CLEAR : wa_guid1.
        REFRESH : it_guid1.
        wa_guid1-guid = w_guid_ref.
        APPEND wa_guid1 TO it_guid1.
        "save the changes
        CALL FUNCTION 'BAPI_ACTIVITYCRM_SAVE'
          TABLES
            objects_to_save = it_guid1.
        "commit the transaction
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      ENDIF.
    Reply fro any further help.
    Please reward points if helpful.
    Regards,
    Ashlesha

  • How to use SD_VBAK_ARRAY_READ functional module

    hello
    can you please tell me how to use SD_VBAK_ARRAY_READ  functional module. that means what i have to pass and what i should get.
    Please help me

    Hi Ravi,
    i want to display vkorg,kunnr,and some other fields from the VBAK. User enters VKORG and some other fields but VKORG is compulsory.
    so i written the code like this.
    TYPES :BEGIN OF TEITAB_VBAK,
           VKORG type VBAK-VKORG,
           KUNNR TYPE VBAK-KUNNR,
           VBELN TYPE VBAK-VBELN,
           AUDAT TYPE VBAK-AUDAT,
           VDATU TYPE VBAK-VDATU,
           ERNAM TYPE VBAK-ERNAM,
           END OF TEITAB_VBAK.
    DATA: ITAB_VBAK TYPE TABLE OF TEITAB_VBAK,
          WA_VBAK TYPE TEITAB_VBAK.
    SELECT-OPTIONS: s_VKORG FOR P_VKORG OBLIGATORY,         " Sales Organization
                    s_KUNNR FOR P_KUNNR,         " Sold-to party.
                    s_VBELN FOR P_VBELN,         " Sales Document.
                    s_MATNR FOR P_MATNR,         " Material number.
                    s_AUDAT FOR P_AUDAT,         " Document Date (Date Received/Sent).
                    s_VDATU FOR P_VDATU,         " Requested delivery date.
                    s_ERNAM FOR P_ERNAM,         " Name of Person who Created the Object.
                    s_VKAUS FOR P_VKAUS.         " Usage indicator.
    SELECT VKORG KUNNR VBELN AUDAT VDATU ERNAM
    FROM VBAK
    INTO CORRESPONDING FIELDS OF TABLE ITAB_VBAK
    WHERE VKORG IN S_VKORG AND AUART EQ 'ZRA'.
    CALL FUNCTION 'SD_VBAK_ARRAY_READ'
    EXPORTING
      I_BYPASSING_BUFFER          = ' '
      I_REFRESH_BUFFER            =
      TABLES
        IT_VBAK_KEY                 =
      ET_VBAK                     =
    EXCEPTIONS
      RECORDS_NOT_FOUND           = 1
      RECORDS_NOT_REQUESTED       = 2
      OTHERS                      = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    so i confused where to call this fucntional module and what to pass. That means call this functional module before the select query or after the select query and what to pass.
    i am new in ABAP.
    Please help me to solve this problem .

  • How to use BAPI_WARRANTYCLAIM_CHANGE2  function module

    i am unable to pass values to table  parameter.
    for above i have used WTY12_CLAIM_READ function module and i have give only cliam number as input and tried retriving other parameters(tables)
    from these i passed same table parameters to BAPI_WARRANTYCLAIM_CHANGE2  function module but unable to run it in se37.
    please just me any logic or solution to this.
    i am getting repeated error as :
    1)item types
    2)pricing
    3)partner
    if any one can send me a sample code to how to use these bapi .
    thanks,
    lokesh

    Hi Lokesh,
    I believe you are using the FM WTY12_CLAIM_READ_RFC to retrieve the claims related information by just passing Claim Number, and you are not getting any data back from the function module in the table parameters and you won't get any values as well, as there is no code in that function module.
    Thanks,
    Mahesh.

  • How to Use ECC function Module

    Hi Experts - We need to execute the function module in ECC and need to write data in Oracle table.
    We are using BODS 4.0.
    How to use function module in data flow ? how it can work as a source ?
    I just need some basic steps how to use function module as a source and do the transformation to target.
    Thanks
    R

    Hi Ashwani,
    It is still not possible to use a FM as a source in DS.
    You can use a FM in a transformation but you have to start from a file or table as a source and load into a target (a FM can not be an end point of a dataflow - as it is used in the transformation and each transformation requires a source and a target.
    The scenario I described above was based on a situation where you have a source (flat file or table) and want to use a Function Module to transform your data and/or load the data in a transparant table in SAP.
    Your scenario is different, as your source is not a table/ff but a FM.
    In your case, I can see two scerio's:
    - Use an ABAP dataflow. Although I haven't got any experience with this I do believe this would be an option for your scenario. Please referer to the Data Services documentation on ABAP dataflows for further guidance.
    - As suggested earlier, you can create a bespoke (BW) Datasource based on a Function Module. Please refer to SAP help for creating a generic datasource:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm
    Depending on your scenario there might be a third option:
    - Use a SAP transparant table as a source. Create a transformation into the designated Oracle table. In the transformation call a FM which executes whatever logic you require. This solution will work if you have a table which produces the same number of records as your FM. If your function module produces more or less records (than there are in the transparant table), then this might become a bit tricky. It might work, but I have never tried it.
    Instead of a transparant table you can also use a table join, obviously. Perhaps part of the complexity of your FM could be resolved by using a join and you can create a new simpler FM for the remaining logic?
    Good luck,
    Jan.

Maybe you are looking for

  • How to find out if Oracle is Installed in server

    I apologize for the simple question but no one in here seems to know if our server has Oracle installed or not. I have no experience in Oracle and have root access to the server but dont know the command to check wether Oracle is installed or not! an

  • I have windows 7,  did a factory restore now new itunes with icloud will not play movies i have download before update

    I  have windows 7, I just had to do a factory restore. I have a click free for a backup for my computer so when i went to restore my couputer all my music and movies are there but  when my power went out ,I want to watch a movie in the new Itunes non

  • Problems downloading with Windows Vista

    I get this message when i try to use iTunes. What the heck do I do? This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows ins

  • Select Random Records with Group By?

    Hi, I currently select random records by using this type of SQL: (SELECT * FROM ( SELECT * FROM ( SELECT * FROM TABLEA ORDER BY dbms_random.value WHERE ROWNUM <= 100 Based on the following data, I now want to still pick out random records but I only

  • Microsoft Word Office 2011 crashes after upgrade to OSX 10.10.3

    Hi Microsoft Office 2011 crahses at opening after I upgraded to OSX 10/10.3,  I installed the latest version of Office, but get this message when it crahses: Microsoft Error Reporting log version: 2.0 Error Signature: Exception: EXC_BAD_ACCESS Date/T