Need help using hierarchical list with class cl_salv_hierseq_table

I'm trying to learn how to use a hierarchical avl.
so I grabbed this code http://wiki.sdn.sap.com/wiki/display/Snippets/displaysimplehirarchiallistwithclass+cl_salv_hierseq_table
and changed it in order to use the tables bkpf and bseg instead

TABLES: bkpf.
TYPES: BEGIN OF ty_bkpf ,
       belnr LIKE bkpf-belnr,
       bukrs LIKE bkpf-bukrs,
       gjahr LIKE bkpf-gjahr,
       bldat LIKE bkpf-bldat,
       waers LIKE bkpf-waers,
       END OF ty_bkpf.
TYPES: BEGIN OF ty_bseg ,
       buzei LIKE bseg-buzei,
       shkzg LIKE bseg-shkzg,
       END OF ty_bseg.
DATA: it_bkpf TYPE STANDARD TABLE OF ty_bkpf ,
      it_bseg TYPE STANDARD TABLE OF ty_bseg .
DATA: ibinding TYPE salv_t_hierseq_binding.
DATA: xbinding TYPE salv_s_hierseq_binding.
DATA: gr_table TYPE REF TO cl_salv_hierseq_table.
SELECT-OPTIONS:
  ndoc FOR bkpf-belnr,
  empr FOR bkpf-bukrs,
  anod FOR bkpf-gjahr.
START-OF-SELECTION.
  PERFORM get_data.
  PERFORM relat_tables.
  PERFORM display_alv.
*&      Form  get_data
FORM get_data .
  SELECT belnr bukrs gjahr bldat waers
         INTO TABLE it_bkpf
         FROM bkpf
         WHERE belnr IN  ndoc AND
               bukrs IN empr AND
               gjahr IN anod.
  IF sy-subrc = 0.
    SELECT buzei shkzg
           FROM bseg
           INTO TABLE it_bseg
           FOR ALL ENTRIES IN it_bkpf
           WHERE belnr = it_bkpf-belnr AND
                 bukrs = it_bkpf-bukrs AND
                 gjahr = it_bkpf-gjahr.
  ENDIF.
ENDFORM." get_data
*&      Form  relat_tables
FORM relat_tables .
  xbinding-master = 'BUKRS'.
  xbinding-slave  = 'BUKRS'.
  APPEND xbinding TO ibinding.
ENDFORM. " relat_tables
*&      Form  display_alv
FORM display_alv .
  cl_salv_hierseq_table=>factory(
  EXPORTING
  t_binding_level1_level2 = ibinding
  IMPORTING
  r_hierseq = gr_table
  CHANGING
  t_table_level1 = it_bkpf
  t_table_level2 = it_bseg
  gr_table->display( ).
ENDFORM. " display_alv

Similar Messages

  • Re: Beginner needs help using a array of class objects, and quick

    Dear Cynthiaw,
    I just read your Beginner needs help using a array of class objects, and quick of Dec 7, 2006 9:25 PM . I really like your nice example.
    I also want to put a question on the forum and display the source code of my classe in a pretty way as you did : with colors, indentation, ... But how ? In html, I assume. How did you generate the html code of your three classes ? By help of your IDE ? NetBeans ? References ?
    I already posted my question with six source code classes ... in text mode --> Awful : See "Polymorphism did you say ?"
    Is there a way to discard and replace a post (with html source code) in the Sun forum ?
    Thanks for your help.
    Chavada

    chavada wrote:
    Dear Cynthiaw,
    I just read your Beginner needs help using a array of class objects, and quick of Dec 7, 2006 9:25 PM . I really like your nice example.You think she's still around almost a year later?
    I also want to put a question on the forum and display the source code of my classe in a pretty way as you did : with colors, indentation, ... But how ?Just use [code] and [/code] around it, or use the CODE button
    [code]
    public class Foo() {
      * This is the bar method
      public void bar() {
        // do stuff
    }[/code]

  • Need help using XWS-Security with EJB service endpoint

    I am trying to use XWS-Security along the lines of the JWSDP 1.6 examples, but with an EJB endpoint deployed in an ejb-jar file rather than a typical service endpoint deployed in a WAR.
    Any information on how to do this would be appreciated. I believe I'm close to getting an example working- the details on the problem I've encountered are below.
    I use WSCompile to generate stubs and ties for my WS, and XDoclet to generate the ejb-jar.xml. I deploy the ejb-jar on JBoss 4.0.2.
    The problem I'm having is that the security features are handled in the Stubs and Ties generated by WSCompile, and my server-side refuses to use the WSCompile generated Tie. Previously the web service had used the WSCompile argument 'import="true"', which generated no tie, and the web service worked (this was before I tried to add security features). Whatever mechanism had been used to direct messages to my EJB then is still being used now (JNDI, I believe, facilitated by the ejb-jar.xml and webservices.xml files), and bypassing the Tie class that I now generate using 'server="true"'.
    There must be some way I can reconfigure my webservice so that the WSCompile generated Tie is used, but I can't find any help on the topic.
    Can anyone tell me how to make sure my webservice will use the Tie class on the server side? Is it even possible when using EJBs instead of servlets?

    Burn your CD using iTunes. Then rip the music off of the CD using any "ripping" program. Just make sure the program you use has the "save as .wav" option available. Im not familiar with MusicMatch but I'm sure you would be able to use it.

  • Need help using dropdown list control

    We have created a list of 30 markers & saved this as a
    field cast member, to create a dropdown list.
    We want the user to select from the dropdown list the marker
    they want to navigate to; it seems that this
    should be possible using the dropdown list control, but i am
    having trouble setting/choosing the correct
    parameters for this (the two main options are Contents of
    list & Purpose of List) - can anybody help???

    You need to set the Contents parameter to "Markers in this
    movie" and
    the Purpose parameter to "Execute..."
    This will tell the behavior to treat the contents of the
    field as a list
    of frame markers and then have the playback head jump to the
    markers
    that matches the selected line in the field.
    Rob
    Rob Dillon
    Adobe Community Expert
    http://www.ddg-designs.com
    412-243-9119
    http://www.macromedia.com/software/trial/

  • Need help in doing exercise with classes

    Here is my exercise:
    1.     An object Student has: id, last name, first name, number of AAS courses and number of ESL courses in current semester and whether student uses laptop or not.
    The formular to calculate tuition fee:
    Tuition fee = AAS courses *20 ESL courses * +15+
    +If student uses laptop, tuition fee will be deducted 5%
    Write the methods to:
    o     Calculate tuition fee.
    o     Display student information
    My Student class:
    public class Student {
         private String id;
         private String lastName;
         private String firstName;
         private double nAAS;
         private double nESL;
         public void setIdentification(String input) {
              id = input;
         public void setLastName(String input) {
              lastName = input;
         public void setFirstName(String input) {
              firstName = input;
         public String getID() {
              return id;
         public String getLastName() {
              return lastName;
         public String getFistName() {
              return firstName;
         public void setNumberOfAAS(String input) {
              nAAS = Double.parseDouble(input);
         public void setNumberOfESL(String input) {
              nESL = Double.parseDouble(input);
         public double getNumberOfAAS() {
              return nAAS;
         public double getNumberOfELS() {
              return nESL;
         public double result(String input) {
              if (input.equalsIgnoreCase("true")) {
                   return (getNumberOfAAS() * 20 + getNumberOfELS() * 15) * 0.95;
              } else {
                   return getNumberOfAAS() * 20 + getNumberOfELS() * 15;
    }And my DisplayResult class:
    import javax.swing.JOptionPane;
    public class DisplayResult {
         public static void main(String[] args) {
              String input;
              Student st = new Student();
              input = JOptionPane.showInputDialog("Enter the ID here:");
              st.setIdentification(input);
              input = JOptionPane.showInputDialog("Enter the last name:");
              st.setLastName(input);
              input = JOptionPane.showInputDialog("Enter the first name:");
              st.setFirstName(input);
              input = JOptionPane
                        .showInputDialog("Enter number of AAS courses you took:");
              st.setNumberOfAAS(input);
              input = JOptionPane
                        .showInputDialog("Enter number of ESL courses you took:");
              st.setNumberOfESL(input);
              input = JOptionPane
                        .showInputDialog("Enter \"true\" for using laptop and \"false\" if not:");
              st.result(input);
              // Display the result
              JOptionPane.showMessageDialog(null, "The result is:\n" + st.getID()
                        + " " + st.getLastName() + " " + st.getFistName()
                        + "\nYou have: " + st.getNumberOfAAS() + " AAS "
                        + st.getNumberOfELS() + " ESL\n" + "Using laptop: " + input
                        + "\nYour tuitionFee is: "
                        + st.result());
    System.exit(0);
    }The eclipse notice an error which is st.result in DisplayResult class. Please tell my what 's wrong with it?
    Edited by: congtm88 on May 4, 2009 9:43 AM

    Oh thax. I corrected it.
         public static void main(String[] args) {
              String input;
              Student st = new Student();
              input = JOptionPane.showInputDialog("Enter the ID here:");
              st.setIdentification(input);
              input = JOptionPane.showInputDialog("Enter the last name:");
              st.setLastName(input);
              input = JOptionPane.showInputDialog("Enter the first name:");
              st.setFirstName(input);
              input = JOptionPane
                        .showInputDialog("Enter number of AAS courses you took:");
              st.setNumberOfAAS(input);
              input = JOptionPane
                        .showInputDialog("Enter number of ESL courses you took:");
              st.setNumberOfESL(input);
              input = JOptionPane
                        .showInputDialog("Enter \"true\" for using laptop and \"false\" if not:");
              // Display the result
              JOptionPane.showMessageDialog(null, "The result is:\n" + st.getID()
                        + " " + st.getLastName() + " " + st.getFistName()
                        + "\nYou have: " + st.getNumberOfAAS() + " AAS "
                        + st.getNumberOfELS() + " ESL\n" + "Using laptop: " + input
                        + "\nYour tuitionFee is: "
                        + st.result(input));
    System.exit(0);
         }But I think that, I should change result method into useOfLaptop then write one more instance method name getResult in Student class, right?

  • Need help using photo shop with my tshirt design

    need help

    You need to give more information. What OS? What version of Photoshop? Etc.
    If you're using Photoshop CC, then you need to have the Reference Manual:  https://helpx.adobe.com/pdf/photoshop_reference.pdf
    This forum is not necessarily a beginner's training area. You can get started with Photoshop by watching tutorial videos, trying things yourself, and finding answers to specific questions in the Reference Manual (link above).
    Here are some beginner's tutorials:  https://helpx.adobe.com/photoshop/tutorials.html
    You can also Google more advanced Photoshop tutorials, or go to Adobe.com and search for tutorials.
    Good luck.  :+)

  • Need help using school network with mail and ichat....

    so at my local community college where i go, they have free wireless as most colleges do. the first time i open safari on campus, it redirects me to a website where i have to log on the network using an email address. it then logs you on as a guest. when i am on their wireless i am unable to connect to ichat or retrieve my mail. being that the mail is more important to me i posted it in here. i have tried to get it to work numerous times and figured i would rather post here first before i go to the it guys here at school. any help would be great...thanks in advance!!!! off to class for a couple hours right now i will check back later to see if i can answer any questions that can help you guys help me figure this out...i feel like it should be simple to do, but starting to think that maybe it is not possible?

    yea i have the same problem in my college so if any one can help id appreciated

  • HT5622 i need help using the icloud it is not making any since to me can some one call me and help me with it please don't try to help me through email i need to talk and listen i don't understand instruction by reading

    i need help using the icloud it is not making any since to me can some one call me and help me with it please don't try to help me through email i need to talk and listen i don't understand instruction by reading.
    <Phone Number Edited by Host>

    You aren't addressing anyone from Apple here.  This is a user forum.
    You might want to call a neaby Apple store to see if they have a free class you could attend.

  • I want to upgrade the ram on my macbook pro 13inch (early 2011). i found an 8Gb (4Gb x2) PNY "mac compatible" that is DDR3 PC3-10666 but my macbook is a PC3-10600. Do i need to use a ram with the exact specifications that my macbook lists?

    i want to upgrade the ram on my macbook pro 13inch (early 2011). i found an 8Gb (4Gb x2) PNY "mac compatible" that is DDR3 PC3-10666 but my macbook is a PC3-10600. Do i need to use a ram with the exact specifications that my macbook lists? Or will the ram i am trying to buy work fine?

    Yes that is your best bet.  Without looking at it too closely double check your options here:
    OWC http://www.macsales.com/
    or Crucial http://www.crucial.com/

  • Need help on struts configuration with ColdFusion 10 using IIS

    We need help on struts configuration with ColdFusion 10 using IIS.
    Earlier we were using ColdFusion 8 with IIS 6 for one of our application.  This application internally calls struts. After upgrading to ColdFusion 10 struts calls are not loading. We get 404 error.
    In ColdFusion 8 struts were configured using  actions extension .do in IIS from this file-
    C:\ColdFusion8\runtime\lib\wsconfig\jrun_iis6.dll.
    But in ColdFusion 10 this file is not present as ColdFusion 10 uses Tomcat in place of Jrun.
    Also there is no information in ColdFusion log file.

    Duane wrote:
    doctormirabilis, Welcome to the discussion area!
    1) how can i configure the time capsule in order to operate as a remote base station synchronizing with the relay using the ethernet port?
    Configure the Time Capsule to act as a bridge (not distributing IP addresses). Also configure the Time Capsule to create an 802.11n wireless network with a unique network name (SSID). That's it.
    2) how can i avoid that my powerbook while accessing my wireless network does connect through the relay station instead of using the time capsule?
    Configure the Time Capsule to use a different network name than the WDS link between the 2 AirPort Express (AX). Configure the PowerBook to use the Time Capsule network.
    There are 2 pieces of information that you should be aware of...
    (1) None of the PowerBooks are capable of 802.11n.
    (2) The WDS link cuts your available bandwidth in half. So the wireless link to your neighbor's has a maximum potential of 27 Mbps.
    Let's for a minute assume that you have a Mac compatible with 802.11n. In your configuration the time you could take advantage of the 802.11n speed is when the Mac is sending/recieving data directly from/to the Time Capsule.
    There would be NO speed increase in Internet access. The speed of Internet access is going to be controlled by the slowest link in the path to the Internet. That is probably the connection to the ISP. The next slowest path is the WDS link to your neighbor's.
    Duane,
    I am in a similar situation, sharing internet with my neighbor. Do you think it would be plausible to hook up a vonage phone adapter to time capsule's ethernet port if time capsule is bridging from my neighbor's router in the configuration you have described? A check of my upload speed shows 1.67Mbps (powerbookG4 w/ airport extreme). Vonage reccommends 90kbps minimum upload speed. Am I going to lose some speed putting the Vonag adapter behind time capsule?
    Thank you

  • Need help re-synching iPods with new computer and getting iTunes to...

    Need help re-synching iPods with new computer and getting iTunes to recognize our iPods (it doesn't even recognize them when they're plugged in).
    Hubby wiped my harddrive for me, so now I need to get everything back in proper places. I'm using windows XP and installed iTunes once again (I believe it's version 8). I also installed all of my iTunes songs. Now I need to know where to go from here. We have 3 iPods and I need to get them all synched once again. I know how to create different libraries for each of us, but I can't figure out how to get our songs back into our iTunes libraries. When I open iTunes and plug in an iPod, iTunes doesn't even show that an iPod is plugged in.
    What do I do now to get each of our iPods synched with our own libraries?
    TIA
    Brandy

    Thanks Zevoneer. The "Restart ipod service" worked and itunes is now recognizing my ipod! Hooray!
    Okay, now how do I synch all of our ipods with our individual libraries (I don't want all of my kids' songs and vice versa)? We each have hundreds of songs on our ipods that we don't want to lose.
    Thanks again!

  • I need helping using iAds in my application.

    I need helping using iAds in my application. I currently am not using any storyboards. I am using Sprite builder for my UI.
    I attatched an image ot show all the different file name I have.
    Everyone is being used & they all work fully.
    The "iAdViewController.h & .m" files are just example codes I looked up and was messing with so that my iAd can work.

    I wouldn't even be able to use the Mathscript node in an executable? 
    What I am trying to do is make a user configurable data stream. 
    They tell me how many bytes are in the stream and what parameters they
    want to be put in to it.  Currently I have to make vi's that are
    called dynamicaly to make the parameters.   Then recompile
    the code and send it to them.  This is somewhat of how the config
    file is set up so I know how to make the data.
    Data_Type  foo
    Bytes 30
    parameter_name        
    function           
       byte#          format
    sync              
    foo_sync            
    29               int
    time                              
    foo_time             
    1,2,3,4       double
    If I can't use MathScript to allow the user to make there own functions
    is there another way that I might be able to do this so I do not have
    to recompile the code atleast?  Were I might just be able to make
    the new function and send that to them.
    Any Idea would be great.

  • Do I need to use specific printers with Macbook Pro?

    Do I need to use specific printers with Mac?

    Only those that provide compatible printer drivers.
    OS X- Printer and scanner software available for download
    OS X Mavericks- Set up a printer

  • I have misplaced my iPod Touch 4th Generation. According to Find my iPhone, it should show up in offline mode. I need help on locating it with a software or some other way. Help?

    I have misplaced my iPod Touch 4th Generation. According to Find my iPhone, it should show up in offline mode. I need help on locating it with a software or some other way. Help?

    There is no other way.
    Sorry

  • Need help using dbms_scheduler to submit an immediate job on the database

    Hi. I need help using dbms_scheduler to submit an immediate job on the database. Essentially I want to issue a one-time call to an Oracle Stored Procedure - this procedure will then send an email. I've never used dbms_scheduler before, but here's what I have so far.
    So my Program is a stored database procedure named 'TTMS.dropperVacationConflict_Notify', but my problem is that I need to pass 3 parameter values to this job each time I run it. This is what I can't figure out. The procedure expects an 'Id' as number(5), begin_dt as a date, and end_dt as a date.
    How do I pass these values when I run my job? Can anyone help?
    begin
        dbms_scheduler.create_program(program_name=> 'PROG_DROPVACCONFLICTS_NOTIFY',
         program_type=> 'STORED_PROCEDURE',
         program_action=> 'TTMS.dropperVacationConflict_Notify',
         number_of_arguments => 3,
         enabled=>true,
         comments=> 'Procedure to notify PCM of a Dropper Vacation Conflict. Pass in Dropper Id, Begin_dt, and End_dt');
    end;
    begin
        dbms_scheduler.create_schedule
        (schedule_name=> 'INTERVAL_EVERY5_MINUTES',
         start_date=> trunc(sysdate)+18/24,
         repeat_interval => 'freq=MINUTELY;interval=5',
         end_date => null
         comments=> 'Runtime: Every day all 5 minutes, forever'
    end;
    begin
        dbms_scheduler.create_job
        (job_name => 'JOB_DROPVACCONFLICTS_NOTIFY',
         program_name => 'PROG_DROPVACCONFLICTS_NOTIFY',
         schedule_name => 'INTERVAL_EVERY5_MINUTES',
         enabled => true,
         auto_drop => true,
         comments => 'Job to notify PCM of Dropper Vacation Conflicts'
    end;
    /And I use this to execute the job as needed...
    begin
        dbms_scheduler.run_job('JOB_DROPVACCONFLICTS_NOTIFY',true);
    end;
    /

    Duplicate Post
    Need help using dbms_scheduler to submit an immediate job on the database

Maybe you are looking for

  • The system could not create any outputs for mv type 561

    Hi, I tried to print out a goods receipt others in MIGO and i received "The system could not create any outputs" when i tick on output control. I tried to follow the steps in How to print the material document in MB1C movement 561 I stuck at step 4 w

  • Stacking order on PrEl 9 not working

    I am trying to change the stacking order on simultaneous multiple video tracks.  I have two tracks on the screen, I select one from the timeline and then right click on it in the monitor panel -- the option of Title>Arrange doesn't come up.  When I g

  • Need bdc for f-02

    Hi,   I need BDC <b>program for multiple vendor posing</b>, means.. 40 45000000 10000 50 45000000 20000 40 345002    20000 39 55000000 2000 like that i have to post 300 entries..  if u have any program or u have any BAPI bunction Module to post doc's

  • Where to start changeing emulator preferences in Java ME SDK 3.0

    in the Java ME SDK 3.0 help (UserGuide.pdf) i found "The Java ME Platform SDK enables you to configure the Bluetooth and OBEX simulation environment. Choose Edit > Preferences and select Bluetooth/OBEX to display the following window." but there is n

  • Itunes error msg with latest update - will not open!

    Just installed latest itunes update (9.2.1 I think) - update went fine, rebooted, all ok. Just fired the computer up again today and tried opening itunes only to immediately receive an error msg saying "itunes can not open - missing files. Re-install