Function module - post new G/L document

What function module can I use to post a new document in FI?
BR.

Hi,
Please refer to the link below and see if it helps
Re: Posting Key in BAPI_ACC_DOCUMENT_POST
Regards
K.R

Similar Messages

  • Call function module in new task

    I need to call a function module starting new task but the problem is that it has inporting parameters also. Please help me in doing this. Points will be rewarded.

    Look at the ABAP keywords RECEIVE RESULTS FROM FUNCTION.  This is where you can get the results from the CALL FUNCTION MODULE... NEW TASK...
    It's all in the ABAP help for CALL FUNCTION MODULE.
    matt

  • Function Module which creates goods receipt document

    Dear all:
    Do you know a function module which creates goods receipt document?
    Thanks
    Bac

    Hello, Satyanarayana and Mickael,
    I found the function module.  It is called BAPI_GOODSMVT_CREATE. 
    Thank you for your suggestion.  I think your suggestion works also, so now I have two solutions that I can use.
    Bac

  • ABAP Dump when calling Function Module Starting New Task

    Hi all. I have a tricky situation now, I am doing a POC on parallel processing.
    I am getting an ABAP dump on the following Call Function line which is in class lcl_steer_114numc (See below for full program):
    METHOD start.
        CALL FUNCTION 'Z_ZZCLS_STEER_114NUMC'
          STARTING NEW TASK me->id
          CALLING me->finish ON END OF TASK.
      ENDMETHOD.                    "start
    However I get the following ABAP dump:
    Short text
        Statement "CALL FUNCTION .. DESTINATION/STARTING NEW TASK/IN BACKGROUND TASK"
    The function module only contains a wait statement to simulate parallel processing. It is strange that it dumps here, because when I change the FM call to another call that has been triggered successfully from other classes, it still produces the same ABAP dump.
    The background of the Proof Of Concept is to see if I can get an event to trigger the next process that depends on the outcome of the previous process. Parallel processes are run in the start methods by calling RFC.
    <Garbled code removed>
    Moderator Message: Please post relevant portions of the code only.
    Edited by: Suhas Saha on Jul 17, 2011 1:17 PM

    Well, the thing is I did manage to run 3 other Function Modules asynchronously succeesfully prior to that function call, with the same exact function call syntax. Further more, I have tried editing it with your suggestion but I get the exact same dump.
    The complete function group can be downloaded here (slinkee file):
    https://docs.google.com/leaf?id=0B3sua1Bw4XK4ZmFhNzcwMTgtYzQ0Mi00NzQ4LTg5YTMtNDNlNWUxYTM2NTg3&hl=en_US
    The complete program can be downloaded here (slinkee file):
    https://docs.google.com/leaf?id=0B3sua1Bw4XK4YWJmNjU3ODYtODRmMy00Nzg2LThkNTUtZjNkNDRhZGQ3MTUw&hl=en_US
    The complete ST22 dump can be found here:
    https://docs.google.com/leaf?id=0B3sua1Bw4XK4ZDU1YmFkZDAtOTU5MS00ZTgwLWFlZTktNWZhMDUxMzJlZWNl&hl=en_US
    Basically I ST22 gives me the following:
    Runtime Errors         RPERF_ILLEGAL_STATEMENT
    Date and Time          17.07.2011 05:29:54
    |Short text                                                                                |
    |    Statement "CALL FUNCTION .. DESTINATION/STARTING NEW TASK/IN BACKGROUND TASK"                 |
    |What happened?                                                                                |
    |    Error in the ABAP Application Program                                                         |
    |                                                                                |
    |    The current ABAP program "Z_ZZB1_CLOSE_PERIOD_TEST2" had to be terminated                     |
    |     because it has                                                                               |
    |    come across a statement that unfortunately cannot be executed.                                |
    And it explains it here (but is not helpful / relevant at all) as I ran the program from SE38.
    |Error analysis                                                                                |
    |    There is probably an error in the program                                                     |
    |    "Z_ZZB1_CLOSE_PERIOD_TEST2".                                                                  |
    |    The program was probably called in a conversion exit                                          |
    |    or in a field exit. These are implemented by                                                  |
    |    function modules called CONVERSION_EXIT_xxxxx_INPUT/OUTPUT or                                 |
    |    USER_EXIT_xxxxx_INPUT.                                                                        |
    |    Conversion exits are triggered during screen field transports or                              |
    |    WRITE statements, field exits during field transports from the                                |
    |    screen to the ABAP/4 program.                                                                 |
    |    In this connection, the following ABAP/4 statements are not allowed:                          |
    |                                                                                |
    I hope you try to download the slinkee files and you will notice the call function I performed was no different than the other call function RFC calls that really are working.

  • 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 to read the pdf document.

    Hi guys ,
       I need to know the function module which is used to read all the documents(pdf).?
    Regards,
    vinothkumar.G

    Hi
    If you need to open and show a pdf file you can use the method EXECUTE of class CL_GUI_FRONTEND_SERVICES.
    CALL METHOD cl_gui_frontend_services=>execute
    EXPORTING
    document = 'MY_FILE.pdf'
    APPLICATION =
    PARAMETER =
    default_directory = path
    MAXIMIZED =
    MINIMIZED =
    SYNCHRONOUS =
    OPERATION = 'OPEN'
    EXCEPTIONS
    cntl_error = 1
    error_no_gui = 2
    bad_parameter = 3
    file_not_found = 4
    path_not_found = 5
    file_extension_unknown = 6
    error_execute_failed = 7
    synchronous_failed = 8
    not_supported_by_gui = 9
    OTHERS = 10
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.

  • Function Module to Update Shipment Cost Document through Idoc.....?

    Is there any EDI function module which can Update Shipment Cost Document through Idoc.....

    Hi Vijendra,
    Welcome to SDN.
    You can use FM IDOC_INPUT_SHPMNT with message SHPMNT and IDoc type SHPMNT01/02/03/04/05 to update shipment document.
    Hope this will help.
    Regards,
    Ferry Lianto
    Please reward points if very helpful.

  • Webgui - function module starting new task

    Hello,
    we want to call a function module which opens a new task from a webgui transaction. This webgui transaction is integrated into EP 6.0.
    Does anybody know how to handle this matter?
    Thanks in advance and best regards,
    Petra

    Hi Petra,
    "call function .... starting new task " creates a new external session for the current login session. This is the same as doing a /o or "system - Create session". Due to technical restrictions in webgui only one external session is possible.
    Best regards,
    Klaus

  • Calling Function Module starting new job

    Hallo !
    I'm calling a 'Z' function module from a class method.
    I want the calling will start immediately a new job.
    (That I will see in SM37)
    (Like we can do with submit statement)
    Is there a way to this ?
    (I need the function will start a job - because
    I want to save the function log in the Job list.)
    Thanks in advance,
      N.S.

    step : 1
    Sample Program: Creating a Job with JOB_OPEN
    <b>explanation :</b>
    Use JOB_OPEN to create a background job. The function module returns the unique ID number which, together with the job name, is required for identifying the job.
    Once you have "opened" a job, you can add job steps to it with JOB_SUBMIT and submit the job for processing with JOB_CLOSE.
    Create your job with JOB_OPEN. The module returns a unique job
    number. Together with the jobname, this number identifies the
    job. Other parameters are available, but are not required.
    JOBNAME = 'Freely selectable name for the job(s) you create'.
    CALL FUNCTION 'JOB_OPEN'
    EXPORTING
    JOBNAME = JOBNAME
    IMPORTING
    JOBCOUNT = JOBNUMBER
    EXCEPTIONS
    CANT_CREATE_JOB = 01
    INVALID_JOB_DATA = 02
    JOBNAME_MISSING = 03
    OTHERS = 99.
    IF SY-SUBRC > 0.
    <Error processing>
    ENDIF.
    step 2;
    Sample Program: Adding an ABAP Job Step
    <b>explanation :</b>
    Use JOB_SUBMIT to add a job step to a background job that you have opened with JOB_OPEN.
    A job step is an independent unit of work in a job, the execution of an ABAP or external program. Each job step can have its own authorizations user and printer/optical archiving specifications.
    Add a job step: ABAP program
    CALL FUNCTION 'JOB_SUBMIT'
    EXPORTING
    AUTHCKNAM = SY-UNAME " Runtime authorizations
    " user
    JOBCOUNT = JOBNUMBER " Value from JOB_OPEN
    JOBNAME = JOBNAME " Value from JOB_OPEN
    REPORT = 'REPORT' " Report to be run
    VARIANT = 'VARIANT' " Variant to use with
    " report
    PRIPARAMS = USER_PRINT_PARAMS " User printing options
    ARCPARAMS = USER_ARC_PARAMS " User archiving options
    " Both sets of options
    " come from
    " GET_PRINT_PARAMETERS
    EXCEPTIONS
    BAD_PRIPARAMS = 01
    INVALID_JOBDATA = 02
    JOBNAME_MISSING = 03
    JOB_NOTEX = 04
    JOB_SUBMIT_FAILED = 05
    LOCK_FAILED = 06
    PROGRAM_MISSING = 07
    PROG_ABAP_AND_EXTPG_SET = 08
    OTHERS = 99.
    step 3
    Sample Program: Immediate Start with JOB_CLOSE
    <b>explanation :</b>
    Use JOB_CLOSE to pass a background job to the background processing system to be run. Once you have "closed" a job, you can no longer add job steps to it or change job/job step specifications.
    The function module returns an indicator as to whether the job was automatically released or not. A job is automatically released to run only if the user who scheduled the job has RELE release authorization for the authorization object Operations on background jobs.
    A job step is an independent unit of work in a job, the execution of an ABAP or external program. Each job step can have its own authorizations user and printer/optical archiving specifications.
    Submit job for processing: immediate start
    CALL FUNCTION 'JOB_CLOSE'
    EXPORTING
    JOBCOUNT = JOBNUMBER " Job identification: number
    JOBNAME = JOBNAME " and name.
    STRTIMMED = 'X' " Schedules the job for
    " immediate start. The job
    " is started immediately
    " only if the user has the
    " RELE authorization to
    " release a job to run.
    IMPORTING
    JOB_WAS_RELEASED = JOB_RELEASED " If user has authorization
    " to release jobs to run, job
    " is automatically released
    " when it is scheduled. This
    " field is set to 'x' if the
    " job has been released.
    " Otherwise, the job is sche-
    " duled but must be released
    " by an administrator before
    " it can be started.
    EXCEPTIONS
    CANT_START_IMMEDIATE No longer used. Replaced by IMPORTING
    parameter JOB_WAS_RELEASED.
    INVALID_STARTDATE = 01
    JOBNAME_MISSING = 02
    JOB_CLOSE_FAILED = 03
    JOB_NOSTEPS = 04
    JOB_NOTEX = 05
    LOCK_FAILED = 06
    OTHERS = 99.
    IF SY-SUBRC > 0.
    <Error processing>
    ENDIF.
    in step 1  we will create a job with name etc..
    in step 2 we will assign work to this job
    step 3 : we will close the job inorder make it scheduled .
    Regards
    srikanth
    added descriptions to each steps

  • Function Module to check in a document

    Hi everybody,
    I'm currently working on some document management. My purpose is to implement the modification of documents.
    I found out some BAPI such as BAPI_DOCUMENT_CHANGE2 but I'm having some troubles when I want to modify the status.
    Using cv02n, it seems like checking in the original makes my BAPI works fine. I found some functions for that such as BAPI_DOCUMENT_CHECKIN2 but it raises the message error E 26 253 : Error while checking in and storing:
    xxx\xxx\xxx.xxx
    I checked in OACT transaction and my storage category is assigned.
    Does anybody have ever faced this problem? Maybe there is an easier way to modify documents using fonctions?
    Best regards,
    Sebastien

    hi,
    Please check your entry once again,
    Allocate document data
    lf_doctype = 'DRW'.
    lf_docnumber = '4711'.
    lf_docversion = '000'.
    lf_docpart = '00'.
    lf_status = 'RE'. note: u are not enterd, status i guess, while u chek in the status should be changed from old to new.. try out by entring status,
    Error occurred ??
    IF ls_return-type CA 'EA'.
    ROLLBACK WORK.
    MESSAGE ID '26' TYPE 'I' NUMBER '000'
    WITH ls_return-message.
    Also,
    Note: in DC10, at define status, u select field, No entry, and run Bapi.
    Benakaraj
    ??P

  • 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

  • Function Module to save existing Shipment Document

    Hello,
    I have a list of deliveries and I want to re-save the shipment document so the corresponding output types of the shipment documents are re-triggered. I am currently working in 4.6C and there is no BAPI to change the shipment document. Please let me know if there is any FM that can be used to re-save the shipment document.
    My ultimate requireent is to trigger the output type in the shipment. However when i re-save shipment document without any change, it does not triggeres the output type. How can we trigger the output type in shipment based on some condition in delivery?
    Thanks & Regards,
    Rohit
    Edited by: Rohit Malik on Dec 9, 2010 6:02 PM

    Thanks Sravanthi. But I still have some more issue with this BAPI. 'Coz I my requirement is to add a new screen enhancement. So I created additional custom fields to table AFIH. This is my problem, I can't find ways to update those fields.
    When I looked in your BAPI, I can't find ay structure there that includes those custom fields for update. Do you have more idea on this? Any reply will be highly appreciated.

  • Search for a function module for deleting document originals (DMS)

    Hi,
    I'm searching for a function module to delete originals in documents (like manually with transaction cv02n). I'm only able to set an delete mark with the module 'BAPI_DOCUMENT_DELETE'.
    The module 'BAPI_DOCUMENT_CHANGE2' can only add new originals to an existing document. I need a possibility to delete all originals in an document without deleting the document itself.
    Has anyone an idea?
    Thanks.
    Jan-Christian Treusch

    Many thanks!
    That's especially the method I've searched for so long....
    best regards.
    Jan-Christian Treusch

  • Function Module require for Accounting Document

    Hi All,
    Is there any Function Module available for getting Accounting document no which is created after IR.
    Regards,
    Paras

    Hi,
    You can use BAPI_ACC_DOCUMENT_POST.
    Regards,
    Eli

  • Billing Document Function Module

    Is there any function module to find out Billing Document is of which transaction type i.e. whether it is a Sales order Billing Document or it is a Service Order Billing Document or is an UBB Contract Billing Document.

    I have a FI object to be generated so input screen variable are all FI fields. Now I have to connect this to the sales order. I can retrieve the GL account from the input given.
    So now i need to find the billing document related to the GL account, which can be done through table BSEG. AS BSEG is a cluster table, at runtime it takes very long time to retrieve the data. So can u suggest me any other method to get billing document.
    , like any Function module etc.

Maybe you are looking for

  • For some unbeknownst reason, my iTunes refuses to import any of my Madonna CD's!

    I have never experienced any problems in the past when importing from CD's, I'm not using copies either - these are the original releases. I have randomly picked CD's from other artists to see if this problem applies to them and have found it doesn't

  • New Sony website for XDCAM and NXCAM FCPX plugin!

    http://www.sonycreativesoftware.com/download/pdzk-lt2 Just got off the phone with Jorge at Apple Pro Apps FCPX support and also Doug Bierschenk with Sony Professional Support; I was unaware of the newest Sony XDCAM / NXCAM software support website. 

  • DNS in Solaris 10

    Hi Freinds, I am trying installing DNS on Solaris 10 10/09 s10s_u8wos_08a SPARC. I could not find named.conf file in the entire harddisk. So #svcadm enable /network/dns/server:default makes the dns server service in to "maintenance" mode. Can anybody

  • Terms of Payment with Posting key 09

    Hi, My client is a construction company which undertakes customer projects. Scenarios of retention amounts are very common in construction industry. We have a scenario where in at the time of sales invoiceing the amount of the invoice gets divided in

  • Macro swc_set_objectkey in ABAP Class

    Hello, I want to use macro swc_set_objectkey in ABAP class.  macro swc_set_objectkey is present in include <object>. I can not include <object> in ABAP class because it gives syntax error "You may only define classes, interfaces, or types in a CLASS-