Error with Function Module for Automatically Reversing FI Documents

We are trying to use BAPIACREV to automatically reverse a document as part of workflow but get an error with 2 of the import parameters stating they were never transferred:
1) OBJ_KEY_R
2) OBJ_SYS
Does anyone know how to resolve this?

Hi,
OBJ_KEY : Reference Key
This key value must be created while posting the document and this key must be maintained in any of SAP tables
for example : If the it is Accounting document then all detail found in BKPF and BSEG table, you can find OBJ_KEY in BKPF-AWKEY field.
OBJ_SYS : Logical system of source document
Logical system may be maintained in some table.
for example : If the it is Accounting document then all detail found in BKPF and BSEG table, you can find OBJ_SYS in BKPF-AWSYS field.
or you can use following FM to get logical system
CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
IMPORTING
OWN_LOGICAL_SYSTEM = L_V_OWN_LOGICAL_SYSTEM
EXCEPTIONS
OWN_LOGICAL_SYSTEM_NOT_DEFINED = 1
OTHERS = 2

Similar Messages

  • Functional module for automatic creation of pur requisition & pur order

    hello,
    what is the functional module for automatic creation of puchase requisition and automatic creation of purchase order which we will assign in action box in service order processing management.
    please let me know as early as possible
    regards,
    rajesh kumar raju

    Hi,
             Please check with following.
    IDOC_INPUT_ACC_PURCHASE_REQUI
    IDOC_INPUT_ACC_PURCHASE_ORDER
    /ISDFPS/OR_PURCHASE_ORDER_CR
    BS01_PURCHASE_DOCUMENT_CREATE
    CO_MP_CREATE_PURCHASE_ORDER
    Thanks & Regards
    Sadhu Kishore

  • Error in function module  for inbound processingwhile testing from we19

    hi,
    I have developed a custom function module for processing inbound idoc for creating material using bdc...the problem is that when i am trying to test my idoc using we19 and calling my function module in debug mode an error is displayed showing 'interface for function module is incorrect' and also i am unable to see my function module in debugging mode.It is only displaying the error message...
    I have given all the parameters necessary (import,export or tables) and found no error in the interface...I think the problem is appearing before my function module is being called....Also on seeing the short dump analysis I have seen that the error is in the form 'Idocs passed to application' which is not a part of the function module developed by me...
    I am unable to understand why this error message is being displayed...
    Please help me out of this..

    ya i know that ..But I wanted to create a simple one..moreover the problem is not with bdc....It is with the function module interface..
    Also I want to ask a question that I had to define all the parameters (in the function module ) by data declaration statements in the function group top include..
    If i dont do that say the first error is when i write loop at idoc_contrl ..idoc_contrl is not declared by a data statement..So IO had to write a data statement:
    Idoc_contrl type table of edidc..I have seen that in other function modules (idoc inbound processing)  no such data declaration is done..

  • Error with function module TABLE_COMPRESS?

    Hi all,
    What is the alternate function module for TABLE_COMPRESS?
    This is going fine in 4.7 version.
    But in ECC 6.0, if we use this function module we r getting SLIN error (Obsolate statements) .
    How can we rectify this SLIN error?
    So we have to use another funtion module for the same purpose.
    Can any one help on this?
    Rewards to all.
    Thanks & Regards
    Anu.

    Hi,
    I you have complex type in the parameter list you will get this error for example generic types, xtrings, strings, object references.
    But, function module can be called from programs.
    Check for Oss notes if you want to solve this problem
    Best regards..

  • Error with Function Module

    Hi Guys,
    I have created a custom function module ,and transported to Production server,but the thing is am getting an error like "Error generating the test frame".What could be the reason?Give me your suggetions on the same.
    Warm Regards,
    Mohandoss P.

    Hi,
    I you have complex type in the parameter list you will get this error for example generic types, xtrings, strings, object references.
    But, function module can be called from programs.
    Check for Oss notes if you want to solve this problem
    Best regards..

  • Function Module For Customer Receivable Invoice Document Wise

    Dear All,
    Is there a standard Function Module / BAPI available for calculating Customer Receivable amount invoice document wise? I will explain the scenario in greater detail:
    1) Invoice is booked against customer (FB70 / SD Interface)
    2) Receipt is made (F-28 )
    3) Matching of invoice is done at the time of receipt (either partial or residual)
    4) Customer Account Clearing is done (F-32)
    We have explored tables BSID,BSAD,BSEG and BSE_CLR, but are unable to decipher the exact logic by which the System is storing the cleared amount, invoice document wise. We have tried referring to BSEG-REBZG (Invoice Reference) and BSE_CLR for finding out the clearing document and thus arriving at the invoice document balance, but the table entries are not similar in case of partial and residual payment and hence it is creating problem in deducing the actual invoice wise open balance. Can anyone refer to some FM / API / Logic for deducing the same?
    Your inputs will be sincerely appreciated.
    Thanks and Sincere Regards,
    Amitabha

    Hi People,
    Any ideas?
    Thanks and Sincere regards,
    Amitabha

  • FUNCTION MODULE FOR AUTOMATIC MAIL GENERATION

    Hello,
    I want to generate an automatic mail of a scheduled report on everyday basis.
    the output spool req of scheduled report in generated n saved inside the system.
    Could you please help me in generating automatic mail through that saved spool request?
    Regards,
    Krutika

    hi,
    use:
    DATA: lv_filesize    TYPE i,
            lv_buffer      TYPE string,
            lv_attachment  TYPE i,
            lv_testo       TYPE i.
      DATA: li_pdfdata  TYPE STANDARD TABLE OF tline,
            li_mess_att TYPE STANDARD TABLE OF solisti1,
            li_mtab_pdf TYPE STANDARD TABLE OF tline,
            li_objpack  TYPE STANDARD TABLE OF sopcklsti1,
            li_objtxt   TYPE STANDARD TABLE OF solisti1,
            li_objbin   TYPE STANDARD TABLE OF solisti1,
            li_reclist  TYPE STANDARD TABLE OF somlreci1,
            li_objhead  TYPE soli_tab.
      DATA: lwa_pdfdata  TYPE tline,
            lwa_objpack  TYPE sopcklsti1,
            lwa_mess_att TYPE solisti1,
            lwa_objtxt   TYPE solisti1,
            lwa_objbin   TYPE solisti1,
            lwa_reclist  TYPE somlreci1,
            lwa_doc_chng TYPE  sodocchgi1.
      CONSTANTS: lc_u           TYPE char1  VALUE 'U',
                 lc_0           TYPE char1  VALUE '0',
                 lc_1           TYPE char1  VALUE '1',
                 lc_pdf         TYPE char3  VALUE 'PDF',
                 lc_raw         TYPE char3  VALUE 'RAW',
                 lc_ordform     TYPE char15 VALUE 'ZORDCONFIRM_01',
                 lc_attachment  TYPE char10 VALUE 'ATTACHMENT'.
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format                = lc_pdf
          max_linewidth         = 132
        IMPORTING
          bin_filesize          = lv_filesize
        TABLES
          otf                   = pv_otfdata
          lines                 = li_pdfdata
        EXCEPTIONS
          err_max_linewidth     = 1
          err_format            = 2
          err_conv_not_possible = 3
          err_bad_otf           = 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.
      LOOP AT li_pdfdata INTO lwa_pdfdata.
        TRANSLATE lwa_pdfdata USING ' ~'.
        CONCATENATE lv_buffer lwa_pdfdata INTO lv_buffer.
        CLEAR lwa_pdfdata.
      ENDLOOP.
      TRANSLATE lv_buffer USING '~ '.
      DO.
        lwa_mess_att = lv_buffer.
        APPEND lwa_mess_att TO li_mess_att.
        CLEAR lwa_mess_att.
        SHIFT lv_buffer LEFT BY 255 PLACES.
        IF lv_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    Object with PDF.
      REFRESH li_objbin.
      li_objbin[] = li_mess_att[].
      DESCRIBE TABLE li_objbin LINES lv_attachment.
    Object with main text of the mail.
      lwa_objtxt = space.
      APPEND lwa_objtxt TO li_objtxt.
      CLEAR lwa_objtxt.
      DESCRIBE TABLE li_objtxt LINES lv_testo.
    Create the document which is to be sent
      lwa_doc_chng-obj_name  = text-008.
      lwa_doc_chng-obj_descr = text-008.
      lwa_doc_chng-sensitivty = lc_0.
      lwa_doc_chng-obj_prio = lc_1.
      lwa_doc_chng-doc_size = lv_testo * 225.
    Pack to main body.
      CLEAR lwa_objpack-transf_bin.
    header
      lwa_objpack-head_start = 1.
    The document needs no header (head_num = 0)
      lwa_objpack-head_num   = 0.
    body
      lwa_objpack-body_start = 1.
      lwa_objpack-body_num   = lv_testo.
      lwa_objpack-doc_type   = lc_raw.
      APPEND lwa_objpack TO li_objpack.
      CLEAR lwa_objpack.
    Create the attachment.
    Fill the fields of the packing_list for the attachment:
      lwa_objpack-transf_bin = gc_x .
    header
      lwa_objpack-head_start = 1.
      lwa_objpack-head_num   = 1.
    body
      lwa_objpack-body_start = 1.
      lwa_objpack-body_num   = lv_attachment.
      lwa_objpack-doc_type   = lc_pdf.
      lwa_objpack-obj_name   = lc_attachment.
      lwa_objpack-obj_descr  = text-008.
      lwa_objpack-doc_size =  lv_attachment * 255.
      APPEND lwa_objpack TO li_objpack.
      CLEAR lwa_objpack.
      lwa_reclist-receiver   = pv_emailid.
      lwa_reclist-rec_type   = lc_u.
      lwa_reclist-notif_del  = gc_x.
      lwa_reclist-notif_ndel = gc_x.
      APPEND lwa_reclist TO li_reclist.
      IF li_reclist IS NOT INITIAL.
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            document_data              = lwa_doc_chng
            put_in_outbox              = gc_x
          TABLES
            packing_list               = li_objpack
            object_header              = li_objhead
            contents_bin               = li_objbin
            contents_txt               = li_objtxt
            receivers                  = li_reclist
          EXCEPTIONS
            too_many_receivers         = 1
            document_not_sent          = 2
            document_type_not_exist    = 3
            operation_no_authorization = 4
            parameter_error            = 5
            x_error                    = 6
            enqueue_error              = 7
            OTHERS                     = 8.
        IF sy-subrc <> 0.
             MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ENDIF.

  • Function module for reversing documents

    Is there a function module for posting reversal documents like F08 transaction.....

    Hi,
    We have BAPI's to reverse the documents.
    Check with 'BAPIREVERSE in SE37.
    Right now iam not on the systemto go indepth.
    Thanks,
    Deepak.

  • Function module for fiscal year

    Hi all,
    can you please suggest me the function module for automatic generation of fiscal year.
    Thanks and regards,
    S.Latha.

    Hi Latha,
    Please find below the code for auto generation of the fiscal year.
      l_date = sy-datum.       "l_date should declared of type sy-datum
    Use the function module to get the period
          CALL FUNCTION 'MC_PERIODE_ZUM_DATUM'
               EXPORTING
                    idate        = l_date
                    iperkz      = l_p         " 'P'
                    iperiv       = l_periv   "V6
               IMPORTING
                    eperid       = l_period
               EXCEPTIONS
                    wrong_period = 1
                    OTHERS       = 2.
    l_fiscal = l_period+0(4).
    l_p - 'P'   i. e. Is the period indicator (Period according to fiscal year variant)
    l_periv - 'V6'  i.e. Is the Fiscal year variant. Here it is V6 which relates country 'US'.
    l_period - gives you the Fiscal period.
    l_fiscal -  The first four digits of l_period gives you the 'Fiscal year'.
    Hope this helps you !.
    Thanks & Regards,
    MM Jaffer.
    Edited by: MohammedJaffer on Aug 10, 2010 12:53 PM

  • Function module for detailes description of Order and long text in task

    Hello gurus,
                       please help me with Function module for detaile description of Order and long text in task list(operation Tab)?
    regards,
    YK

    Hi, 
    You should be able to read the Order short text directly from table AUFK. The Order long text or task list long text can be read by using FM "Read_text". Use Goto> Header on every long text screen to identify the parameters that need to be passed hen using this FM.
    Regards
    Narasimhan

  • Error in XXL_FULL_API function module for download report to excel

    Hi all,
    I am using XXL_FULL_API function module for download report to excel, In this FM we have to fill a table called sema        = t_gxxlt_s. in this table we have a fields called
    i_sema-col_no  = 19.
      i_sema-col_src = 19.
      i_sema-col_typ = 'STR'.
      i_sema-col_ops = 'DFT'
    here in 'col_typ' if we put STR in excel it will come as a text but i wnat the time field what i have to pass ?
    and for filed 'col_ops' also ??
    Thaks,
    Sridhar

    Hi sridhar joshi,
    Please check this program
    REPORT Excel.
    TABLES:
      sflight.
    * header data................................
    DATA :
      header1 LIKE gxxlt_p-text VALUE 'Suresh',
      header2 LIKE gxxlt_p-text VALUE 'Excel sheet'.
    * Internal table for holding the SFLIGHT data
    DATA BEGIN OF t_sflight OCCURS 0.
            INCLUDE STRUCTURE sflight.
    DATA END   OF t_sflight.
    * Internal table for holding the horizontal key.
    DATA BEGIN OF  t_hkey OCCURS 0.
            INCLUDE STRUCTURE gxxlt_h.
    DATA END   OF t_hkey .
    * Internal table for holding the vertical key.
    DATA BEGIN OF t_vkey OCCURS 0.
            INCLUDE STRUCTURE gxxlt_v.
    DATA END   OF t_vkey .
    * Internal table for holding the online text....
    DATA BEGIN OF t_online OCCURS 0.
            INCLUDE STRUCTURE gxxlt_o.
    DATA END   OF t_online.
    * Internal table to hold print text.............
    DATA BEGIN OF t_print OCCURS 0.
            INCLUDE STRUCTURE gxxlt_p.
    DATA END   OF t_print.
    * Internal table to hold SEMA data..............
    DATA BEGIN OF t_sema OCCURS 0.
            INCLUDE STRUCTURE gxxlt_s.
    DATA END   OF t_sema.
    * Retreiving data from sflight.
    SELECT * FROM sflight
             INTO TABLE t_sflight.
    * Text which will be displayed online is declared here....
    t_online-line_no    = '1'.
    t_online-info_name  = 'Created by'.
    t_online-info_value = 'KODANDARAMI REDDY'.
    APPEND t_online.
    * Text which will be printed out..........................
    t_print-hf     = 'H'.
    t_print-lcr    = 'L'.
    t_print-line_no = '1'.
    t_print-text   = 'This is the header'.
    APPEND t_print.
    t_print-hf     = 'F'.
    t_print-lcr    = 'C'.
    t_print-line_no = '1'.
    t_print-text   = 'This is the footer'.
    APPEND t_print.
    * Defining the vertical key columns.......
    t_vkey-col_no   = '1'.
    t_vkey-col_name = 'MANDT'.
    APPEND t_vkey.
    t_vkey-col_no   = '2'.
    t_vkey-col_name = 'CARRID'.
    APPEND t_vkey.
    t_vkey-col_no   = '3'.
    t_vkey-col_name = 'CONNID'.
    APPEND t_vkey.
    t_vkey-col_no   = '4'.
    t_vkey-col_name = 'FLDATE'.
    APPEND t_vkey.
    * Header text for the data columns................
    t_hkey-row_no = '1'.
    t_hkey-col_no = 1.
    t_hkey-col_name = 'PRICE'.
    APPEND t_hkey.
    t_hkey-col_no = 2.
    t_hkey-col_name = 'CURRENCY'.
    APPEND t_hkey.
    t_hkey-col_no = 3.
    t_hkey-col_name = 'PLANETYPE'.
    APPEND t_hkey.
    t_hkey-col_no = 4.
    t_hkey-col_name = 'SEATSMAX'.
    APPEND t_hkey.
    t_hkey-col_no = 5.
    t_hkey-col_name = 'SEATSOCC'.
    APPEND t_hkey.
    t_hkey-col_no = 6.
    t_hkey-col_name = 'PAYMENTSUM'.
    APPEND t_hkey.
    * populating the SEMA data..........................
    t_sema-col_no  = 1.
    t_sema-col_typ = 'STR'.
    t_sema-col_ops = 'DFT'.
    APPEND t_sema.
    t_sema-col_no = 2.
    APPEND t_sema.
    t_sema-col_no = 3.
    APPEND t_sema.
    t_sema-col_no = 4.
    APPEND t_sema.
    t_sema-col_no = 5.
    APPEND t_sema.
    t_sema-col_no = 6.
    APPEND t_sema.
    t_sema-col_no = 7.
    APPEND t_sema.
    t_sema-col_no = 8.
    APPEND t_sema.
    t_sema-col_no = 9.
    APPEND t_sema.
    t_sema-col_no = 10.
    t_sema-col_typ = 'NUM'.
    t_sema-col_ops = 'ADD'.
    APPEND t_sema.
    CALL FUNCTION 'XXL_FULL_API'
      EXPORTING
    *   DATA_ENDING_AT          = 54
    *   DATA_STARTING_AT        = 5
       filename                = 'TESTFILE'
       header_1                = header1
       header_2                = header2
       no_dialog               = 'X'
       no_start                = ' '
        n_att_cols              = 6
        n_hrz_keys              = 1
        n_vrt_keys              = 4
       sema_type               = 'X'
    *   SO_TITLE                = ' '
      TABLES
        data                    = t_sflight
        hkey                    = t_hkey
        online_text             = t_online
        print_text              = t_print
        sema                    = t_sema
        vkey                    = t_vkey
    EXCEPTIONS
       cancelled_by_user       = 1
       data_too_big            = 2
       dim_mismatch_data       = 3
       dim_mismatch_sema       = 4
       dim_mismatch_vkey       = 5
       error_in_hkey           = 6
       error_in_sema           = 7
       file_open_error         = 8
       file_write_error        = 9
       inv_data_range          = 10
       inv_winsys              = 11
       inv_xxl                 = 12
       OTHERS                  = 13
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    please refer this link
    http://www.thespot4sap.com/Articles/Download_to_excel.asp
    Best regards,
    raam

  • Problem with Time stamp function module for converting US to Japan

    Hi All,
    I need standard function module for converting US Timestamp to Japan, Can any one let me know is there any standard function modules.
    thanks in advance!
    Regards,
    Kalidas.T
    Edited by: Kalidas Thirumoorthy on May 5, 2009 5:29 PM
    Edited by: Kalidas Thirumoorthy on May 5, 2009 5:30 PM
    Edited by: Kalidas Thirumoorthy on May 5, 2009 5:30 PM

    Try this way:
    CONVERT TIME STAMP <tst> TIME ZONE <tz> INTO DATE <d> TIME <t>.
    CONVERT DATE <d> TIME <t> INTO TIME STAMP <tst> TIME ZONE <tz>.
    <tst> is of type P(8) or P(11) with 7 decimal places
    <tz> of type C(6)
    Refer to help.sap.com for more details.

  • Function module for creation of Installed base along with product

    Hi,
            Function module for creation of installed based with product for the business partner.

    Try
    BAPI_IBASE_CREATE
    IB_IBASE_CREATE
    IB_IBASE_CREATE_INITIAL
    CRM_IBASE_COMP_CREATE
    CRM_IBASE_CREATE
    IB_COM2_CREATE_IBASE
    IB_COM_CREATE_IBASE_INITIAL
    Regards,
    Kaushal

  • Any BAPI/Function Module for adding new record with dates in PA0027

    Hi all,
    I am tryig to find is there any BAPI/Function module for updating new record with Start Date and End date for specified Personal Number in PA0027 Table.
    In PA0027 table i will be passing start date and end date for selected personal number, it needs to add new record with this details in the table checking the condition that this start date and end dates should not be between any of of start date and end dates for the specified personal number.
    thanks for ur time.
    Murali

    Hi Raj/Suresh thanks for ur answers.
    but i am having a problem,i gave this values.
    INFTY               -
                0027
    NUMBER              -
                00000010
    SUBTYPE             -
                010
    OBJECTID
    LOCKINDICATOR
    VALIDITYEND         -
                03/12/2006
    VALIDITYBEGIN       -
                03/01/2006
    RECORDNUMBER        -
                000
    RECORD              -
                P0027
    OPERATION           -
                CHK
    TCLAS               -
                A
    DIALOG_MODE         -
                0
    NOCOMMIT            -
                Y
    VIEW_IDENTIFIER
    SECONDARY_RECORD
    i am getting short dump saying that
    The source field is too short.
    The current program, "SAPLHRMM", tried to assign a field to a field symbo
    However, the field is shorter than the type of the field symbol, which
    is not allowed.
    The statement in question is in the form ASSIGN f TO <fs> CASTING or
    ASSIGN f TO <fs> with a field symbol that was created using the
    STRUCTURE addition.
    I tried  operation - Chage,Create (same thing for all inputs)
    is this correct funtion moduel for my requirment?
    what ever i am passing the start and end dates this should check in the table records with this personal number and if this start date and end dates are not between of any start and end dates then it should add new record with this dates.
    Thanks for ur time.
    Murali.

  • Function Module For F-04

    Hi
    Is there any function module for F-04 transaction.
    Please help with answers.

    Hi,
    Check the following Exits
    SAPLF051                     Workflow for FI (pre-capture, release for payment)
    RFKORIEX                    Automatic correspondence
    RFEPOS00                   Line item display: Checking of selection conditions
    RFAVIS01                  Customer Exit for Changing Payment Advice Segment Text
    FEDI0001                    Function Exits for EDI in FI
    FARC0002                  Additional Checks for Archiving MM Vendor Master Data
    F180A001                  Balance Sheet Adjustment
    reward if useful
    regards,
    Anji

Maybe you are looking for

  • Error while installing connector and printer drivers for MDSD

    Hi experts, When installing printer drivers and connector on my handheld i am getting errors. I am usind MDSD21 application. here are the components i am installing. CONNECTOR_WM50_XSL_CRM_1_2_8 PIPRONEMF8I_WM50_XSL_CRM Also pasting the trace file..

  • How to create web services in java?

    Hi, I am a newbie to java webservices. Can anybody tell me how to create web services in java? Any tutorial link or step by step doc would be useful. Appreciate your help in this regard. Thanks in advance. naymo01.

  • Outgoing payment exchange rate issue

    Hi all, i have an outgoing payment in yen. but the system 6 decimals does not alow me to calculate the amount without difference.How can i increase the decimal? or any workaround on this? Thanks in advance.. joanne

  • Invalid number error while loading data thru ODI

    Hi John, I have a table as source whic has text as well as numeric data.The column type is varchar2. In on interface i have to load the positions which is textual data. For that i used a filter saying account='Postions' and it got loaded. In the seco

  • Call library function node - function not found

    When creating a DLL I get a the Labview error "Call Library Function Node "LabviewReceiverDLL.dll:readDataJ1939Data' Function not found. Everything looks correct to me and this used to work, though I've changed computers since then. This is the begin