How to get KTOPL for a given BELNR

Hi all you experts!
I am codding a simple report that obtains some data from BSAK including BELNR and SAKNR.
I need to show in this report the description of SAKNR. I know that I can get it from table SKAT but in order to do that I need to know SPRAS and KTOPL.
I don't have any problem getting SPRAS. But I don't know how to get the correct value for KTOPL.
Could any of you kindly tell me how can I get KTOPL for a given BSAK-BELNR?
Many thanks in advance.

Hello
Using direct DB selections for such a basic standard functionality is just nonsense.
BSAK contains both the company code (BUKRS) and the account (SAKNR). Thus, simply feed BAPI_GL_ACC_GETDETAIL with these details and the EXPORTING parameter ACCOUNT_DETAIL contains the required texts.
Even though there are alternative fm's like
GL_ACC_GETDETAIL
READ_SACHKONTO_AND_TEXT
I always recommend to use the most generic approach (here: BAPI ).
Regards
  Uwe

Similar Messages

  • How to get classification for a given material and material type in MM

    Hello Friends,
    One of my developer colleagues is struggling to find out : how to get classification for a given material and material type in MM?
    He is looking for probable table and table fields to Select from.
    I would appreciate seriously any help in this regard.
    ~Yours Sincerely

    Hi
    Below given the flow and table details for a given class and class type.
    - Table KLAH --> This contains the "Internal class no" [ for the given Class & Class type ]
    - Table KSML --> This contains the " internal character numbers " [ nothing but characteristics attached to the class ] , which can be fetched with the above fetched internal class no
    - Table AUSP --> This table contains the objects ( material ) attached to the internal characters of that class
    - Table CABNT --> This table contains the "Description" for the internal character numbers.
    - award points if this is ok

  • How to get LASTDAY for each and every month between given dates..

    Hi Friend,
    I have a doubt,How to get LASTDAY for each and every month between given dates..
    for ex:
    My Input will be look like this
    from date = 12-01-2011
    To date = 14-04-2011
    And i need an output like
    31-01-2011
    28-02-2011
    31-03-2011
    is there any way to achieve through sql query in oracle
    Advance thanks for all helping friends

    Here's a 8i solution :
    select add_months(
             trunc(
               to_date('12-01-2011','DD-MM-YYYY')
             ,'MM'
           , rownum ) - 1 as results
    from all_objects
    where rownum <= ( months_between( trunc(to_date('14-04-2011','DD-MM-YYYY'), 'MM'),
                                      trunc(to_date('12-01-2011','DD-MM-YYYY'), 'MM') ) );
    The above two query is worked in oracle 11GActually the first query I posted is not correct.
    It should work better with
    months_between(
       trunc(to_date(:dt_end,'DD-MM-YYYY'),'MM'),
       trunc(to_date(:dt_start,'DD-MM-YYYY'),'MM')
    )Edited by: odie_63 on 12 janv. 2011 13:53
    Edited by: odie_63 on 12 janv. 2011 14:11

  • How to get Text for nodes in Tree Structure

    Hi Friends,
    How to get Text for nodes in Tree Structure
    REPORT  YFIIN_REP_TREE_STRUCTURE  no standard page heading.
                       I N I T I A L I Z A T I O N
    INITIALIZATION.
    AUTHORITY-CHECK OBJECT 'ZPRCHK_NEW' :
                      ID 'YFIINICD' FIELD SY-TCODE.
      IF SY-SUBRC NE 0.
        MESSAGE I000(yFI02) with SY-TCODE .
        LEAVE PROGRAM.
      ENDIF.
    class screen_init definition create private.
    Public section
      public section.
        class-methods init_screen.
        methods constructor.
    Private section
      private section.
        data: container1 type ref to cl_gui_custom_container,
              container2 type ref to cl_gui_custom_container,
              tree type ref to cl_gui_simple_tree.
        methods: fill_tree.
    endclass.
    Class for Handling Events
    class screen_handler definition.
    Public section
      public section.
        methods: constructor importing container
                   type ref to cl_gui_custom_container,
                 handle_node_double_click
                   for event node_double_click
                   of cl_gui_simple_tree
                   importing node_key .
    Private section
      private section.
    endclass.
    *&                        Classes implementation
    class screen_init implementation.
    *&                        Method INIT_SCREEN
      method init_screen.
        data screen type ref to screen_init.
        create object screen.
      endmethod.
    *&                        Method CONSTRUCTOR
      method constructor.
        data: events type cntl_simple_events,
              event like line of events,
              event_handler type ref to screen_handler.
        create object: container1 exporting container_name = 'CUSTOM_1',
                       tree exporting parent = container1
                         node_selection_mode =
                cl_gui_simple_tree=>node_sel_mode_multiple.
        create object: container2 exporting container_name = 'CUSTOM_2',
        event_handler exporting container = container2.
    event-eventid = cl_gui_simple_tree=>eventid_node_double_click.
        event-appl_event = ' '.   "system event, does not trigger PAI
        append event to events.
        call method tree->set_registered_events
             exporting events = events.
        set handler event_handler->handle_node_double_click for tree.
         call method: me->fill_tree.
      endmethod.
    *&                        Method FILL_TREE
      method fill_tree.
        data: node_table type table of abdemonode,
              node type abdemonode.
    types:    begin of tree_node,
              folder(50) type c,
              tcode(60) type c,
              tcode1(60) type c,
              tcode2(60) type c,
              text(60) type c,
              text1(60) type c,
              text2(60) type c,
              end of tree_node.
      data:  wa_tree_node type tree_node,
                t_tree_node type table of tree_node.
    wa_tree_node-folder = text-001.
    wa_tree_node-tcode  = text-002.
    wa_tree_node-text =  'Creditors ageing'.
    wa_tree_node-tcode1 = text-003.
    wa_tree_node-text1 =  'GR/IR aging'.
    wa_tree_node-tcode2 = text-004.
    wa_tree_node-text2 =  'Bank Balance'.
    append wa_tree_node to t_tree_node.
    clear wa_tree_node .
    wa_tree_node-folder = text-005.
    wa_tree_node-tcode  = text-006.
    wa_tree_node-text =  'Creditors ageing'.
    wa_tree_node-tcode1 = text-007.
    wa_tree_node-text1 =  'Creditors ageing'.
    wa_tree_node-tcode2 = text-008.
    wa_tree_node-text2 =  'Creditors ageing'.
    append wa_tree_node to t_tree_node.
    clear wa_tree_node .
    wa_tree_node-folder = text-009.
    wa_tree_node-tcode  = text-010.
    wa_tree_node-text =  'Creditors ageing'.
    wa_tree_node-tcode1 = text-011.
    wa_tree_node-text1 =  'Creditors ageing'.
    wa_tree_node-tcode2 = text-012.
    wa_tree_node-text2 =  'Creditors ageing'.
    append wa_tree_node to t_tree_node.
    clear wa_tree_node .
    node-hidden = ' '.                 " All nodes are visible,
        node-disabled = ' '.               " selectable,
        node-isfolder = 'X'.                                    " a folder,
        node-expander = ' '.               " have no '+' sign forexpansion.
        loop at t_tree_node into wa_tree_node.
          at new folder.
            node-isfolder = 'X'.                      " a folder,
            node-node_key = wa_tree_node-folder.
                   clear node-relatkey.
            clear node-relatship.
            node-text = wa_tree_node-folder.
            node-n_image =   ' '.
            node-exp_image = ' '.
            append node to node_table.
          endat.
         at new tcode .
            node-isfolder = ' '.                          " a folder,
            node-n_image =   '@CS@'.       "AV is the internal code
            node-exp_image = '@CS@'.       "for an airplane icon
            node-node_key = wa_tree_node-tcode.
             node-text = wa_tree_node-text .
                     node-relatkey = wa_tree_node-folder.
            node-relatship = cl_gui_simple_tree=>relat_last_child.
          endat.
          append node to node_table.
        at new tcode1 .
            node-isfolder = ' '.                          " a folder,
            node-n_image =   '@CS@'.       "AV is the internal code
            node-exp_image = '@CS@'.       "for an airplane icon
            node-node_key = wa_tree_node-tcode1.
                     node-relatkey = wa_tree_node-folder.
            node-relatship = cl_gui_simple_tree=>relat_last_child.
              node-text = wa_tree_node-text1.
         endat.
          append node to node_table.
           at new tcode2 .
            node-isfolder = ' '.                          " a folder,
            node-n_image =   '@CS@'.       "AV is the internal code
            node-exp_image = '@CS@'.       "for an airplane icon
            node-node_key = wa_tree_node-tcode2.
                     node-relatkey = wa_tree_node-folder.
            node-relatship = cl_gui_simple_tree=>relat_last_child.
            node-text = wa_tree_node-text2.
         endat.
          append node to node_table.
        endloop.
        call method tree->add_nodes
             exporting table_structure_name = 'ABDEMONODE'
                       node_table = node_table.
      endmethod.
    endclass.
    *&                        Class implementation
    class screen_handler implementation.
    *&                        Method CONSTRUCTOR
      method constructor.
       create object: HTML_VIEWER exporting PARENT = CONTAINER,
                      LIST_VIEWER exporting I_PARENT = CONTAINER.
      endmethod.
    *&                 Method HANDLE_NODE_DOUBLE_CLICK
      method handle_node_double_click.
      case node_key(12).
    when 'Creditors'.
    submit YFIIN_REP_CREADITORS_AGING  via selection-screen and return.
    when  'Vendor'.
    submit YFIIN_REP_VENDOR_OUTSTANDING  via selection-screen and return.
    when 'Customer'.
    submit YFIIN_REP_CUSTOMER_OUTSTANDING  via selection-screen and
    return.
    when 'GR/IR'.
    submit YFIIN_REP_GRIR_AGING  via selection-screen and return.
    when 'Acc_Doc_List'.
    submit YFIIN_REP_ACCOUNTINGDOCLIST  via selection-screen and return.
    when 'Bank Bal'.
    submit YFIIN_REP_BANKBALANCE  via selection-screen and return.
    when 'Ven_Cus_Dtl'.
    submit YFIIN_REP_VENDORCUST_DETAIL via selection-screen and return.
    when 'G/L_Open_Bal'.
    submit YFIIN_REP_OPENINGBALANCE via selection-screen and return.
    when 'Usr_Authn'.
    submit YFIIN_REP_USERAUTHRIZATION via selection-screen and return.
    endcase.
      endmethod.
    endclass.
    Program execution ************************************************
    load-of-program.
      call screen 9001.
    at selection-screen.
    Dialog Modules PBO
    *&      Module  STATUS_9001  OUTPUT
          text
    module status_9001 output.
      set pf-status 'SCREEN_9001'.
      set titlebar 'TIT_9001'.
      call method screen_init=>init_screen.
    endmodule.                 " STATUS_9001  OUTPUT
    Dialog Modules PAI
    *&      Module  USER_COMMAND_9001  INPUT
          text
    module user_command_9001 input.
    endmodule.                 " USER_COMMAND_9001  INPUT
    *&      Module  exit_9001  INPUT
          text
    module exit_9001 input.
    case sy-ucomm.
    when 'EXIT'.
      set screen 0.
    endcase.
    endmodule.
            exit_9001  INPUT

    you can read  the table node_table with nody key value which imports when docubble click the the tree node (Double clifk event).
    Regards,
    Gopi .
    Reward points if helpfull.

  • How can I see if my program is for more than one user? We think we have bought in design for more users, but can not find out how to get in for more than one?

    How can I see if my program is for more than one user? We think we have bought in design for more users, but can not find out how to get in for more than one?

    If you bought a CC for team, you can log in at http://adobe.com and insert the e-mail that you gave at the moment at the purchase and than you can manage and see you product/plan/team.
    If I was not clear you can use the following link to help you solving your issue:
    Creative Cloud Help | Manage your Creative Cloud for teams membership
    If your not clear about this situation, contact with an agent of Adobe, by chat or phone. Use the following link to see the type of support you have on this matter:
    http://adobe.com/getsupport
    I think this will help you.
    Regards

  • Re: how to get apps for iphone 3g 4.2.1

    Re: how to get apps for iphone 3g 4.2.1 all apps support higher version help....
    Sep 24, 2013 6:34 AM (in response to Rajmit)
    I still have an old 3G which I use mostly as a ipod/radio. By accident I found you can overide the i-tunes block.
    1. Select Apps in Apps store icon on the phone.
    2. Choose App to download
    3.  At "Instal" button press it QUICKLY in blocks of 3 presses, keep doing  this until it overides the i-tune warning, then if there were legacy  versions for os 4.2.1 it says something like "this app is for os 5 or  above", but gives you a choice to download an older version. Select  this.
    Sometimes  it says the Apps is for newer hardware, requiring motion sensors, front  camera's etc.. just got to accept these ones don't work on legacy  hardware.
    4.  Download does not work for all Apps, esp. newer ones written after os  4.21 or if the developer doesn't have the vintage apps archived- e.g.  Instagram downloads, but won't run (wants to update), or WSJ and Barrons  stalls and goes through a download loop.
    I am not making this up, as I bought this old 3g unit on e-bay, after a complete factory reset I now have:
    -  Tune-in, FB, Pandora,Skype, Twitter, Bloomberg, MSNBC, Forbes,  Marketwatch, Viber, amongst a host of other news apps like LATimes.
    Some Apps will download ok, and then at activation says its too old and no longer supported e.g Whats App.
    Otherwise,  good luck. Tune-in, Pandora, Skype and Twitter is all I need to keep me  happy with an old unit, even though I've got newer hardware. Never let  anything die unnaturally.

    I still have an old 3G which I use mostly as a ipod/radio. By accident I found you can overide the i-tunes block.
    1. Select Apps in Apps store icon on the phone.
    2. Choose App to download
    3. At "Instal" button press it QUICKLY in blocks of 3 presses, keep doing this until it overides the i-tune warning, then if there were legacy versions for os 4.2.1 it says something like "this app is for os 5 or above", but gives you a choice to download an older version. Select this.
    Sometimes it says the Apps is for newer hardware, requiring motion sensors, front camera's etc.. just got to accept these ones don't work on legacy hardware.
    4. Download does not work for all Apps, esp. newer ones written after os 4.21 or if the developer doesn't have the vintage apps archived- e.g. Instagram downloads, but won't run (wants to update), or WSJ and Barrons stalls and goes through a download loop.
    I am not making this up, as I bought this old 3g unit on e-bay, after a complete factory reset I now have:
    - Tune-in, FB, Pandora,Skype, Twitter, Bloomberg, MSNBC, Forbes, Marketwatch, Viber, amongst a host of other news apps like LATimes.
    Some Apps will download ok, and then at activation says its too old and no longer supported e.g Whats App.
    Otherwise, good luck. Tune-in, Pandora, Skype and Twitter is all I need to keep me happy with an old unit, even though I've got newer hardware. Never let anything die unnaturally.

  • [JS][CS3]how to get refrence for source file

    Hi All
    I am new and learning javascript Gradually Could any one help on this as i do have a code for load style but don't know how to get refrence for "source file" and "targetDoc"
    targetDoc.importStyles(charImport, sourceFile, clashPolicy);
    targetDoc.importStyles(paraImport, sourceFile, clashPolicy);
    Can any one figure it out
    Many Thanks

    I'm not sure what you are trying to achieve, could you please elaborate?
    Do you want to load all the styles from one document into all 100 documents, or do you want all the styles from the 100 documents into 1 document or what is the goal?
    The following will let you choose a folder of files, open each of the files in it and import the styles from source document. It is not a complete script, make sure to test and modify before running on anything else than test files :-)
    var MyFolderWithFiles = Folder.selectDialog ("Choose a folder");
    var sourceFile = File.openDialog("Choose the styles source");
    var myFiles = MyFolderWithFiles.getFiles("*.indd");
    for(i = 0; i < myFiles.length; i++) {
        theFile = myFiles[i];
        app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
        var targetDoc = app.open(theFile, true);
        app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;
        targetDoc.importStyles(ImportFormat.CHARACTER_STYLES_FORMAT, sourceFile, GlobalClashResolutionStrategy.LOAD_ALL_WITH_OVERWRITE);
        targetDoc.importStyles(ImportFormat.PARAGRAPH_STYLES_FORMAT, sourceFile, GlobalClashResolutionStrategy.LOAD_ALL_WITH_OVERWRITE);
        targetDoc.close(SaveOptions.YES);
    Thomas B. Nielsen
    http://www.lund-co.dk

  • I have canceled my account same day and joining because the convert PDF to word did not convert correctly how to get credit for cancelled membership

    I have canceled my account same day and joining because the convert PDF to word did not convert correctly how to get credit for cancelled membership

    You need to contact Adobe Customer Support :
    They will check and assist you. (Live Chat)
    Contact Customer Care

  • How to get appstore for mac os x 10.4.11?

    how to get appstore for mac os x 10.4.11?

    Go to Apple menu -> About this Mac.   If you have a G3, G4, or G5 processor you can't access the App Store at all.
    If you have an Intel Mac, updating to 10.6.6 is described here:
    https://discussions.apple.com/docs/DOC-2455

  • How to get Reports for specific User that how many password has been reset using FIM SSPR in FIM 2010 R2 SSPR

    Hi,
    How to get Reports for specific User that how many password has been reset using FIM SSPR in FIM 2010 R2 SSPR
    Regards
    Anil Kumar

    Hello there Anil,
    A simple way to quickly get a overview is to look at the request history within the portal environment (note that this will expire in a few day based on your environment, after that you would need to FIM Reporting Module - but you could increase this to
    maybe 60 days to so, watch the DB size).
    To do this you could create some custom search scopes of do some custom queries. The creator of the SSPR activities always has the same GUID so you can use that so search.
    In your search scope you can use the following XPath to play with.
    - All Password Reset Requests - /Request[Creator='b0b36673-d43b-4cfa-a7a2-aff14fd90522' and Operation='Put']
    - All Completed Password Reset Requests - /Request[Creator='b0b36673-d43b-4cfa-a7a2-aff14fd90522' and RequestStatus=‘Completed']
    You can play with the "RequestStatus".
    Hope this helps.
    Almero Steyn (http://www.puttyq.com) [If a post helps to resolve your issue, please click the "Mark as Answer" of that post or "Helpful" button of that post. By marking a post as Answered or Helpful, you help others find the answer
    faster.]

  • My mac OS X did not come with GarageBand, how do get it for free?

    My mac OS X did not come with GarageBand, how do get it for free?
    I don't want to pay for garageband because it should have come with my laptop but it didn't. I got it used so that might be the problem. Also I installed leopard on it. I'm not sure if that would affect it at all. Please help. Thanks.

    Okay, so you bought the machines used?
    What OS version was on it when you bought it?
    You bought Snow Leopard (10.6.x) and installed it?
    The original version is important because there were some OS versions that did not include iLife (incl. Garageband) - you had to get it separately. And, the retail Snow Leopard disk does not include it.
    So, if that is correct, then it doesn't have to have it installed. In any case, you can still buy a retail version of iLife with the full suite of apps from online retailers; either version 09 or 11 will work with your OS. Or you can just buy Garageband at the app store.

  • Sample configuration of IME 7.0 with NME-IPS-K9 and How to get licence for NME-IPS-K9?

    Dear all,
    I already installed NME-IPS-K9 with Cisco Router 2821 series successfully and I used IME(Cisco IPS Manager Express 7.0.1) to configure NME-IPS-K9 but I never try with this before. I have some issue need everyone help:
    1. Could you share the sameple for configuring IME with NME-IPS-K9 to monitor and manage all network traffice or package that attack to NME-IPS-K9?
    2. Could you show me how to get licence for NME-IPS-K9?
    Thanks everyone for your time to help me and share your great ideas.
    I am really appreciated and  looking for forward to hearing response from you all.
    With my warm regards,
    Sarem Phy
    H/P:092562530

    CPU 100% on the NME-IPS module is normal. It will always show 100%. CPU on IPS is not related to the inspection load.
    To check if the IPS module is overloaded, please check the "Inspection Load" speedometer.

  • How to find suborders for the given production orders?

    can any one give solution for finding the sub-orders for my given finished product,
    prodution order?
    my finished product may have the hierarchy as.....
    Finished Goods-> Semi-finished  goods ->  Semifinished-> up to n numbers
    > at last raw material.
    how to find the relation ship between production orders and corres ponding
    cost for this requirement?
    Thanks .
    <u><b>Solution Rewarded.</b></u>

    Hello Meeta
    If you are considering Reporting Manager as appraiser.
    First get pernr, find out position ID from the infotype 0001, check the relationship A002 maintained for the appraisee's position (HRP1001), and finally to find out Appraiser ID check the relationship A008 (HRP1001) of the appraiser's position.
    BR
    Reddy

  • How to get pageid for a page

    Does anybody know how to determine the pageid for a page in portal, given the name for that page (i.e., in which table(s) does oracle store the information required to do this mapping)?
    I am trying to use mod_rewrite to translate /foo/a_sample_page to /portal/page?_pageid=63,34033&_dad=portal&_schema=PORTAL, but I do not know how to get the pageid for the page given the name.
    The reason I'm not letting modplsql take care of this, via a direct access url, is that i don't want a redirect to occur, and there seems to be no way to turn off redirection unless I do all the mod_rewrite stuff myself.
    thanks for any help...
    -c.

    Hi thank Q for the guidance but it seem that i having error when i tried this sql
    INTO l_siteid, l_id
    ERROR at line 2:
    ORA-00905: missing keywor
    My Sql sattement as follow:
    SELECT siteid, id
    INTO l_siteid, l_id
    FROM portal.wwpob_page$
    WHERE name = 'MONITORING';
    The 3 page id is it referring to TAB>? can i get the tab name or the tab page name?
    Because i am dispplaying my top pages but it seems that
    my chart has repeated page name because i only uses first 2 number .... while my logging alotof them have 3 numbers

  • How to get sum for each currency's in ALV Report

    Hi,
    A column has amounts with various currency's.
    May I know how to get sum quantity for each currency in ALV Report?
    Thanks in advance.

    Hi,
    Currency value column should have reference to currency code column.
    Regards,
    Wojciech

Maybe you are looking for