How to get object type and object key from Bapi_acc_gl_posting_post

Hi,
  Currently iam implementing FB01 transaction thru Bapi_acc_gl_posting_post.
I got object key by including document no, fiscal year and Document data
I got object type from TTYP table. But iam not sure it is correct.
After implemeting the BAPI return code is giving successfull and i commited the process.
But at last data is not updating in BKPF table. There is no document number displayed at BKPF...Please go thru and do the needful its urgent.
Thanks in advance....
Regards,
Ganga

Hi Max,
        I have executed it and it is working only for GL posting but i need to make this for different accounting types like vendors, customers, material customers etc.
I found BAPI_ACC_DOCUMENT_POST. when i executed it is giving error as 'Line entered several Times'.
I following is my code. If time permits please go thru my code and do the need ful..
Thanks in advance.
REPORT  zk_fi_fb01                     .
Data: v_objkey(20) type c.
Data: Docheader type BAPIACHE09.
Data: ACCOUNTGL LIKE BAPIACGL09 occurs 0 with header line,
     ACCOUNTRECEIVABLE like BAPIACAR09,
      ACCOUNTPAYABLE like BAPIACAP09 occurs 0 with header line,
      CURRENCYAMOUNT like BAPIACCR09 occurs 0 with header line,
      RETURN like BAPIRET2 occurs 0.
Data: obj_typ like BAPIACHE09-OBJ_TYPE,
      OBJ_KEY like BAPIACHE09-OBJ_KEY,
      OBJ_SYS like BAPIACHE09-OBJ_SYS.
*Data: gv_belnr type belnr_d.
*Data:file_Na type String.
Data: lsys like TBDLS-LOGSYS.
*START OF SELECTION
START-OF-SELECTION.
*CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
   nr_range_nr                  = '19'
   object                       = 'RF_BELEG' "'FIAA-BELNR'
  QUANTITY                      = '1'
  SUBOBJECT                     = '7777'
  TOYEAR                        = '2007'
  IGNORE_BUFFER                = ' '
IMPORTING
  NUMBER                        = gv_belnr
QUANTITY                      =
RETURNCODE                    =
*CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
IMPORTING
  OWN_LOGICAL_SYSTEM                   = lsys
EXCEPTIONS
  OWN_LOGICAL_SYSTEM_NOT_DEFINED       = 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.
*concatenate gv_belnr '7777' '2007' into v_objkey.
*Filling Document Header Details
*Docheader-OBJ_TYPE = 'BEBD'.
*Docheader-OBJ_key = V_objkey.
*Docheader-OBJ_SYS = lsys.
docheader-BUS_ACT = 'RFBU'.
Docheader-USERNAME = sy-uname.
Docheader-COMP_CODE = '7777'.
Docheader-DOC_DATE   = '20070724'.
Docheader-PSTNG_DATE = '20070725'.
Docheader-FISC_YEAR = '2007'.
Docheader-DOC_TYPE = 'KZ'.
*Item data for ACCOUNTGL
ACCOUNTGL-ITEMNO_ACC = '0000000001'.
ACCOUNTGL-GL_ACCOUNT = '0000000501'.
ACCOUNTGL-DOC_TYPE   =  'KZ'.
ACCOUNTGL-COMP_CODE  = '7777'.
ACCOUNTGL-FISC_YEAR  = '2007'.
ACCOUNTGL-PSTNG_DATE = '20070725'.
*ACCOUNTGL-DE_CRE_IND = 'S'.
append ACCOUNTGL.
ACCOUNTGL-ITEMNO_ACC = '0000000002'.
ACCOUNTGL-GL_ACCOUNT = '0000400002'.
ACCOUNTGL-DOC_TYPE   = 'KR'.
ACCOUNTGL-COMP_CODE  = '7777'.
ACCOUNTGL-FISC_YEAR  = '2007'.
ACCOUNTGL-PSTNG_DATE = '20070725'.
*ACCOUNTGL-DE_CRE_IND = 'H'.
append ACCOUNTGL.
*Account payable
ACCOUNTPAYABLE-ITEMNO_ACC = '0000000001'.
ACCOUNTPAYABLE-GL_ACCOUNT = '0000000102'.
ACCOUNTPAYABLE-COMP_CODE  = '7777'.
append ACCOUNTPAYABLE.
ACCOUNTPAYABLE-ITEMNO_ACC = '0000000002'.
ACCOUNTPAYABLE-GL_ACCOUNT = '0000400002'.
ACCOUNTPAYABLE-COMP_CODE  = '7777'.
append ACCOUNTPAYABLE.
*Currency Amount
CURRENCYAMOUNT-ITEMNO_ACC = '0000000001'.
CURRENCYAMOUNT-CURRENCY_ISO = 'INR'.
MOVE 1000 TO CURRENCYAMOUNT-AMT_DOCCUR.
Append CURRENCYAMOUNT.
CURRENCYAMOUNT-ITEMNO_ACC = '0000000002'.
CURRENCYAMOUNT-CURRENCY_ISO = 'INR'.
MOVE '1000-' to CURRENCYAMOUNT-AMT_DOCCUR.
Append CURRENCYAMOUNT.
clear CURRENCYAMOUNT.
clear ACCOUNTGL.
clear ACCOUNTPAYABLE.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
  EXPORTING
    documentheader          = Docheader
  CUSTOMERCPD             =
  CONTRACTHEADER          =
IMPORTING
   OBJ_TYPE                =  obj_typ
   OBJ_KEY                 =  obj_key
   OBJ_SYS                 =  obj_sys
  tables
   ACCOUNTGL               = ACCOUNTGL[]
  ACCOUNTRECEIVABLE       =
   ACCOUNTPAYABLE          = ACCOUNTPAYABLE
  ACCOUNTTAX              =
    currencyamount          = CURRENCYAMOUNT
  CRITERIA                =
  VALUEFIELD              =
  EXTENSION1              =
    return                  = return.
if sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
   WAIT          = ' '.
endif.
if sy-subrc = 0.
WRITE: / OBJ_KEY,
         OBJ_TYP,
         OBJ_SYS.

Similar Messages

  • Transaction SMOEAC does not display Object type and Object Name options.

    Dear all,
    When I go to transaction SMOEAC system does not display fields Object type and Object Name option instead displays an empty frame allowing only to create new objects.
    System does not allow and display existing objects to edit.
    Most imp with the same ID, I am able to see the existing objects and two fields "Object type" and "Object Name" on different machine. So there is no authorization issue.
    My SAP GUI version where these fields are not visible is 640 Final Release with 6405.5.18.1016 version and Patch level 18.
    My SAP GUI version here these fields are visible is 640 Final Release with 6404.4.14.1012 version and Patch Level 14.
    Any idea what could be the reason?
    Regards,
    Sandeep Parab

    With installation of latest version of SAP GUI 710 final Release resolved my problem.
    Regards,
    Sandeep

  • How to get object type and object key of bapi_acc_gl_posting_post

    Hi,
       I want to upload data from flat file to FB01 transaction using BAPI. For this i found bapi_acc_gl_posting_post. How should i get the obj type and object key for this bapi.
    Please let me know wether this is correct bapi for fb01 transaction.
    Thanks in advance,
    Regards,
    Sun.

    Hi,
       I want to upload data from flat file to FB01 transaction using BAPI. For this i found bapi_acc_gl_posting_post. How should i get the obj type and object key for this bapi.
    Please let me know wether this is correct bapi for fb01 transaction.
    Thanks in advance,
    Regards,
    Sun.

  • How to get the private and public key?

    there is my code,i want to get the public key and the private key �Cbut i could not find the the approprite method to solve the problem.
    import java.security.Key;
    import javax.crypto.Cipher;
    import java.security.KeyPairGenerator;
    import java.security.KeyPair;
    import java.security.Security;
    public class PublicExample {
    public static void main(String[] args) throws Exception {
    if (args.length != 1) {
    System.err.println("Usage:java PublicExample <text>");
    System.exit(1);
    byte[] plainText = args[0].getBytes("UTF8");
    System.out.println("\nStart generating RSA key");
    KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
    keyGen.initialize(512);
    KeyPair key = keyGen.generateKeyPair();
    System.out.println("Finish generating RSA key");
    Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
    Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding", "BC");
    //System.out.println("\n" + cipher.getProvider().getInfo());
    System.out.println("\nStart encryption");
    cipher.init(Cipher.ENCRYPT_MODE, key.getPublic());
    byte[] cipherText = cipher.doFinal(plainText);
    System.out.println("Finish encryption:");
    System.out.println(new String(cipherText, "UTF8"));
    System.out.println("\nStart decryption");
    cipher.init(Cipher.DECRYPT_MODE, key.getPrivate());
    /*i want to get the private and public key in this method ,but i found the result was not
    the one i expected to get,how to solve the problem?
    thanks in advance!
    System.out.println("private key:" + key.getPrivate().toString());
    System.out.println("public key:" + key.getPublic().toString());
    byte[] newPlainText = cipher.doFinal(cipherText);
    System.out.println("Finish decryption:");
    System.out.println(new String(newPlainText, "UTF8"));
    thanks in advance!

    System.out.println("private key:" +
    " + key.getPrivate().toString());
    System.out.println("public key:" +
    + key.getPublic().toString());
    key.getPrivate() returns an instance of PrivateKey and key.getPublic() returns an instance of PublicKey. Since PublicKey and PrivateKey are interfaces then they will return one of the concrete implementations. Check out the Javadoc for PublicKey and PrivateKey.
    When you know which concreate implemenation you have then you can use the methods on that object (by appropriate casting) to find the information you want.

  • Object type and object subtipe in configuration of Z component

    I created one Z component and I need to have different configuration views. If I create configuration I have only <DEFAULT> value available for object type and subtype. How can I define other available object types for Z component?
    Thank you in advance.

    Hi Robert,
    You can go to CRM->UI Framework->UI Framework Definition->Define UI Object Types.
    These are generic Object types and can be used for defining configuration of any component.
    Alternatively, you can create your own Object types and Sub Object types (hardcoded) in the method where you want to use them. You can look into method DO_CONFIG_DETERMINATION in class CL_BP_HEAD_ACCOUNTDETAILS_IMPL for reference.
    Thanks
    Vishal

  • How to get the private and public keys to use recaptcha?

    I have registered with google to get a recaptcha for my website. All I got was the site key and secret key! Though I need to get the public and private key for muse!

    Hello,
    Please use site Key as "Public Key"and Secret key as "Private Key".
    Regards
    Vivek

  • How to get Storage unit and Warehouse number from Handling Unit.

    hello all,
    I have Handling unit and Material in my program as an input, using these two fields i have to get corresponding storage unit and ware house number, to pick up transfer order.
    Can anybody explain me who can we get Storage Unit and Warehouse Number from Handling Unit.
    I know we can pull transfer order from table LTAK & LTAP using warehouse number.
    But i dont understand how to get warehouse number from handling unit.
    There is table LSUTO which has warehouse and Handling unit relation, but in our system there is not data maintained in that table. So, i was just wondering how can i get warehouse number from the given handling unit number.
    please guide me
    thanks
    Edited by: Mr A on May 12, 2008 1:23 AM

    Hi ,
        Check out the handling unit item table VEPO. You got storage location(LGORT) in it.
    Reward points if it was useful.
    Regards,
    Abhishek

  • How to get patch type (Security, Recommended, Generic) from a script?

    All-
    If you run updatemanager on Solaris 10, it has a column for patch "Type", and includes Security, Recommended, Generic, etc.
    I would like to be able to have an automated process notify me whenever there are new patches released in either the Security or Recommended category. I've looked at using "smpatch analyze" to get a list of outstanding patches, but the patch list just includes the number and the synopsis, not what "Type" of patch it is. Even using
    smpatch download -t patchnum
    to fetch the README doesn't necessarily give you what Type of patch something is.
    Hence the question: how is updatemanager determining the type of patch? Are there other tools that can be used to figure out what type of patch something is?
    Thanks,
    Tim

    Take a look at pca--http://www.par.univie.ac.at/solaris/pca/

  • How to get SAPGUI type (wingui or java) from an ABAP program

    Hi everyone,
    I am looking for a way to determine the sapgui type; that is if it is a wingui or javagui, from an abap program.
    I know how to get the gui version with
    CL_GUI_FRONTEND_SERVICES=>GET_GUI_VERSION
    call and I also know how to get the platform with
    CL_GUI_FRONTEND_SERVICES=>GET_PLATFORM
    I simply want to determine if a certain sapgui running on a windows pc is a wingui or a javagui.
    Any ideas?
    Thanks,
    Menelaos

    Ok, I finally found it myself!
    It is the function module:
    RSAN_WB_TEST_GET_GUI_TYPE
    at least on a 640 release.
    Can I award me points?
    Menelaos

  • How to get Mobile number and other information from SIM card

    Hi,
    I like to get mobile number,mobile user name and other information from SIM card using j2me program.Is there is any API for this one.
    Any one give guidelines to me how to get this.
    with regards,
    latchiya

    Please use the search! this topic has come up lots of times already.

  • How to get the user and groups information from http header

    Hi All,
    In my current scneario, we are using Siteminder for SSO setup.. And in this process, after authentication and authorization, they are going to append the user information and group information of the user into a HTTP header and it will be sent back to our presentation services.. We have to extract the user information and group information from the http header.
    My HTTP header will look like as follows..
    SM_USER XYZ
    SM_USERDN CN=Firstname\, Lastname\, xyz, OU=GPO-Low Level Security,OU=Domain Users,OU=BU FDT,
    SM_USERGROUPS CN=GG-CA-SiteminderAdmins, OU=Global,OU=Domain Groups, DC=com^CN=GG-ServiceDeskAdmin-TCCORPCEFS
    And also if anyone explain me the overall working of SSO in detail like how presentation services will make a connection to BI server( I guess using Impersonator User), and also how our BI server will read the URL from presentation services and the over all working flow in our OBIEE..
    Thanks a lot....

    Please use the search! this topic has come up lots of times already.

  • How to get Multiple Values for a key from a session object?

    Hi,
    It might seem dumb but I am facing a problem here with the session object. I'll paste the session object's content from the netbeans "Local Variables" window for clarity -
    Name Type Value
    hsession StandardSessionFacade #66
    session LWSFSession #69
    inherited
    attributes Hashtable #80
    [0] Hashtable$Entry "cart"=>#115
    key String "cart"
    value DummyCart #115
    item null
    submit null
    v Vector
    [0] String Full Metal Jacket
    [1] String As Good As It Gets
    [2] String Tim
    What I want is to get the values "Full Metal Jacket", "As Good As It Gets" and "Tim" from the session obejct?
    The problem I am facing is that if I do a session.getAttribute("cart"), I'll get a single value in return. What will that value be? Will it be "item", "submit" or "v"? And if I want all the values in v above, how can I get them?
    Thanks.

    None of the above.
    HttpSession.getAttribute() will return what you put into it using HttpSession.setAttribute(). In your case, it'll return an Object which you need to cast to DummyCart. Then you can access the data in DummyCart using the API of the DummyCart class.
    hth

  • How to get Week,Month and Year details from a date column

    Hi frenz,
    I've a column like tran_date which is a date column..... I need the next week details based on this column and so on...
    I need month and year details as well based on this tran_date column.... can any one tell me how...
    Thanks in advance

    My example for objects:
    create or replace type date_object as object
      centure number,
      year    number,
      month   number,
      day     number,
      hour    number,
      minute  number,
      second  number,
      daypart number,
      week    number,
      constructor function date_object(p_dt date)
        return SELF as result
    create or replace type body date_object is
      constructor function date_object(p_dt date)
        return SELF as result
      as
      begin
        SELF.centure:= trunc(to_char(p_dt,'YYYY')/100);
        SELF.year:=    to_char(p_dt,'YYYY');
        SELF.month:=   to_char(p_dt,'MM');
        SELF.day:=     to_char(p_dt,'DD');
        SELF.hour:=    to_char(p_dt,'HH24');
        SELF.minute:=  to_char(p_dt,'MI');
        SELF.second:=  to_char(p_dt,'SS');
        SELF.daypart:= p_dt-trunc(p_dt,'DD');
        SELF.week:=    to_char(p_dt,'IW');
        return;
      end;
    end;
    select date_object(sysdate),
           date_object(sysdate).year
    from dual;Regards,
    Sayan M.

  • How to get the first and second quarter from CRT

    Dear Freinds,
                    I have one scenario , the Functional SPEC says Read the payroll results and from the CRT  get all the 4 quaters
    for the wage type /5UH  and sum them and then pass on the to field in the main strucutre.
    Iam using the FM HR_GET_PAYROLL_RESULTS
      CALL FUNCTION 'HR_GET_PAYROLL_RESULTS'
        EXPORTING
          pernr                         = fp_v_pernr
          permo                         = fp_v_permo
          pabrj                         = fp_v_pabrj
          pabrp                         = fp_v_pabrp
          actual                        = 'A'
        TABLES
          result_tab                    = i_payresult
        EXCEPTIONS
          no_results                    = 1
          error_in_currency_conversion  = 2
          t500l_entry_not_found         = 3
          period_mismatch_error         = 4
          t549q_entry_not_found         = 5
          internal_error                = 6
          wrong_structure_of_result_tab = 7
          OTHERS                        = 8.
    Iam collecting all the Actual Result (current result) values
    on the selection screen iam passing for month april (04 2008)
    so this falls in the second quater .
    the internal table   i_payresult is picking up only the second quater (01-04-2008 to 30/04/2008 )  ,but since on the selection screen iam pasing as other period (04 2008) the internal table  i_payresult  returing from the FM  (HR_GET_PAYROLL_RESULTS) only   picks the second quater,
    could any one let meknow how i can pick up the first quarter as well and add the first and second quater to mee the requirement .
    Please help me in this regard
    Thanks & regards
    maduri

    Hi Manoj,
                 Thank you for giving me idea for going further  regarding this problem , so my final question for this is
    as per FS they said they are going to enter the payroll
    area and the other selection as 04 2008 
    In order to achieve the first quarter , because 04 2008 means they are going to enter for the second quarter , the payroll results will come only for second quarter and not for the first quater , if they want to sum all the two quarters then they shouldnt pass on the selection screen   the dates as 04 2008, instead they has to pas
    01 01 2008 to 30 06 2008 , as there is no point in they passing as 04 2008 as we are going to consider from 01 2008 to 062008 .   Please correst me if am correct regarding the dates passing on teh selection screen
    or if the user enters on theslection screen still enter 04 2008 and will be  able to acheive the first quarter ??
    Please answer me this point before i can change the logic of the code and tell to my FO regarding this point.
    thanks & regards
    Madhuri

  • How to get the Calendar and Holiday Name from ALBPM engine

    Hi,
    I want to fetch the Calendar Name and Holiday Name that are defined in ALBPM studio/engine.
    How to fetch these through fuego ?
    Bibhu

    Hi,
    Thanks for your help.
    I have executed the code but it did not give me the calendar name as fetchAll() gives me an array.
    I could not find any such method which will give me the Calendar Name.
    The above code give the following result:
    Total Calendar Count: 2 (OK, since I have two calendar in my workspace)
    Calendar Name : fuego.components.CalendarRule@677770 (Want the Calendar Name not this format)
    Calendar Name: fuego.components.CalendarRule@d293b7
    Bibhu

Maybe you are looking for

  • How to open saved files using 'read from text file' function

    Hi everyone, I am having a hard time trying to solve the this particular problem ( probably because I am a newb to lanbview ). Anyway , I am able to save the acquired waveforms by using the 'Write to text file' icon. I did manually modify the block d

  • Problem in keyboard reading....

    i was creating a program which using the keyboard to control the movement of a character,(picture). but when i run the program in jvm 1.4.1 , the program doesn't read anything from the keyboard. previously i was running it in jvm 1.3.1 ..... any solu

  • WL 6.1sp1&sp2 BUG: HttpServletRequest.getRequestURL()

              HttpServletRequest.getRequestURL() always returns "http://..." even if the request           was made with "https://...". The fix is to replace the protocol specification with           the results from getScheme() like so:           String

  • Tool tip areas show up in Internet Explorer

    Hi all, When using the tooltip feature, i get the below issue. THIS IS ONLY FOR IE. Works fine when viewed in Safari, Chrome and Firefox. The hidden areas are always visible and the popup tooltip goes behind the trigger areas. Any ideas? Thanks!

  • Diagonal lines/questionmarks showing up on templates of entire site

    I have a huge website and don't want to have to start all over! Please help. On my iWeb, not the published site, I get all of these diagonal lines and question marks in the background. Part of the template is missing (details of stars in the kid blue