Skip to Content
author's profile photo Former Member
Former Member

list box features

SIR I A BEGINER IN SAP ABAP . THE ISSUE IS WITH THE LIST BOX .

I have 2 list boxs .

1st LIST BOX will have OPTIONS TO PAY BILLS LIKE THE FOLLOWING .

A. ELECTRICITY BILL.

B. TELEPHONE BILL

C INSURANCE BILL.

IF ONE CHOSE TELEPHONE BILL PAYMENT OPTION IN 1ST LIST BOX

THEN 2nd LIST BOX SHOULD SHOW ALL THE TELEPHONE COMPANIS LIKE AIRTEL BSNL, ETC.

IF ONE CHOSE INSURANCE BILL PAYMENT

THEN THE SAME 2ND LIST BOX SHOULD BE LOADED WITH this time " INSURANCE COMPANYS NAMES' LIKE

LIC

BIRLA INSURANCE

ETC...............

PLEASE SOME BODY HELP ME .

THE SAME GOES WITH THE 3RD OPTION THAT IS ELECTRICITY BILL .

REGARDS

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Posted on Aug 06, 2009 at 10:03 AM

    Hi Steve,

    Welcome to SDN

    just folllow the sample code as change according to your needs,

    IF t_customer[] IS INITIAL.---------------------------------------------------------->first list box
        SELECT  pspid FROM proj
                       INTO t_customer-pspid.
          APPEND t_customer.
        ENDSELECT.
    * Function module for appending the customer in the customer listbox
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            retfield   = 'WA_CUSTOMER'
            value_org  = 'S'
          TABLES
            value_tab  = t_customer
            return_tab = return2.
        IF sy-subrc = 0.
          t_customer-pspid  = return2-fieldval.
        ENDIF.
      ENDIF.
      IF NOT wa_customer IS INITIAL.
        v_cus  = wa_customer.
      ENDIF.
    

    second list box based on first one

    Filling the Project Details Based on the Customer
      DATA : v1_pspnr TYPE prps-pspnr.
    * Refreshing the t_project to get the project details based on the customer
      REFRESH : t_project.
      IF t_project[] IS INITIAL.
        SELECT SINGLE pspnr FROM proj
                    INTO v1_pspnr WHERE pspid = wa_customer.
        IF sy-subrc = 0.
          SELECT psphi FROM prps
                    INTO t_prps-psphi
                    WHERE psphi = v1_pspnr.
            APPEND t_prps.
          ENDSELECT.
        ENDIF.
        SELECT posid  FROM prps INTO
                      t_project-posid
                      WHERE psphi = t_prps-psphi.
          APPEND t_project.
        ENDSELECT.
    *Inserting all to the project listbox
        t_project-posid = 'ALL'.
        INSERT t_project INTO t_project INDEX 1.
    * Function module for appending the project in the project listbox
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            retfield   = 'WA_PROJECT'
            value_org  = 'S'
          TABLES
            value_tab  = t_project
            return_tab = return3.
        IF sy-subrc = 0.
          t_project-posid  = return3-fieldval.
        ENDIF.
    * to get the WBS element
        IF NOT wa_project IS INITIAL.
          SELECT SINGLE pspnr FROM prps INTO prps-pspnr
                                     WHERE posid = wa_project.
          IF sy-subrc = 0.
    *        wa_project = prps-pspnr.
            v_pro  = prps-pspnr.
          ENDIF.
        ENDIF.
      ENDIF.
    

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 06, 2009 at 10:10 AM

    This message was moderated.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 06, 2009 at 10:46 AM

    SURESH

    THANK YOU VERY MUCH FOR YOUR REPLY.

    BUT I THINK I HAVE FAILED TO PUT MY REQUIRMENTS PROPERLY .

    MY REQUIRMENT DIFFERS FROM YOU SOLUTION .

    I HAVE ONLY ONE DATA BASE TABLE FOR ELECTRICITY BILL A/C , INSURANCE BILL A/C TELE BILL ACCOUNTS . OF COURSE THEY HAVE DIFFERENT FIELDS .

    I DONT HAVE DIFFERENT TABLES .

    NOW AS I SAID THE FIRST LIST BOX SELECTION WILL AFFECT THE SECOND LIST BOX .

    BUT IN MY CASE *NO DATA BASE WILL GET AFFECTED OR CHANGED * . THERE ARE NO " SELECT QUERYS "

    THE INTERACTION BETWEEN THE 1 ST AND THE 2 ND LIST BOX SHOULD BE INDEPENDENT OF OF ANY SELECT QUERY .

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 06, 2009 at 11:32 AM

    This message was moderated.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 07, 2009 at 07:13 AM

    This message was moderated.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 07, 2009 at 12:00 PM

    Hi stevesteevy

    I have done the same sort of issue 3 months back but for this i have done at database level it self . in my first database table i have around 20 field .as well in my 2nd data base table i have only 4 fields in this 4 filed i have created 2 search help's for this i have used the one which user selects so that the remaning data should come automatically as one search help and the other which include the above one also .and gave the second one in table .i have developed a screen and report on this its working fine. in this way we can solve the problem .There is a sample standard tcode IW29 here if u select in coding u get coding group . you can even go with this help

    Sravya

    Edited by: Sravya Ch on Aug 7, 2009 2:01 PM

    Edited by: Sravya Ch on Aug 7, 2009 2:01 PM

    Edited by: Sravya Ch on Aug 7, 2009 2:26 PM

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.