Pre fill listbox/dropdown dynamicly using ABAP

Hi,
im working with HCM Processing & Forms, using the methods provided standard by SAP, and im trying to get a certain Binding(the dropdown) filled dynamicly.
Ive tried looking for this on the internet/sdn but i cant seem to find anything usefull.
Can anyone point me to a howto, an example or anything usefull?
Thx in advance.
Edited by: R. v. d. Voorden on Jun 17, 2011 1:42 PM

To prefill a drop down you can use GET_HELP_VALUES method of generic service. Here you
need to fill HELP_DATASETS parameter. Certain SAP classes like CL_HRASR00_GS_MGRS_POSITIONS show
how to fill HELP_DATASETS, here they have used INITIALIZE method. Also in the form scenario you need
maintain INPUT HELP with generic service name.
Thanks,
Aravind

Similar Messages

  • Can a transaction be called in background dynamically using ABAP program??

    Hi Experts,
    Can a transaction be called in background dynamically using ABAP program without BDC???
    Regards,
    Mansi.

    u can create job dynamically through programming..Try this sample code..
    data: jobname like tbtcjob-jobname value
                                 ' TRANSFER TRANSLATION'.
    data: jobcount like tbtcjob-jobcount,
          host like msxxlist-host.
    data: begin of starttime.
            include structure tbtcstrt.
    data: end of starttime.
    data: starttimeimmediate like btch0000-char1.
    Job open
      call function 'JOB_OPEN'
           exporting
                delanfrep        = ' '
                jobgroup         = ' '
                jobname          = jobname
                sdlstrtdt        = sy-datum
                sdlstrttm        = sy-uzeit
           importing
                jobcount         = jobcount
           exceptions
                cant_create_job  = 01
                invalid_job_data = 02
                jobname_missing  = 03.
      if sy-subrc ne 0.
                                           "error processing
      endif.
    Insert process into job
    SUBMIT zreport and return               << Here it is a static call but u can make it dynamic
                    with p_param1 = 'value'
                    with p_param2 = 'value'
                    user sy-uname
                    via job jobname
                    number jobcount.
      if sy-subrc > 0.
                                           "error processing
      endif.
    Close job
      starttime-sdlstrtdt = sy-datum + 1.
      starttime-sdlstrttm = '220000'.
      call function 'JOB_CLOSE'
           exporting
                event_id             = starttime-eventid
                event_param          = starttime-eventparm
                event_periodic       = starttime-periodic
                jobcount             = jobcount
                jobname              = jobname
                laststrtdt           = starttime-laststrtdt
                laststrttm           = starttime-laststrttm
                prddays              = 1
                prdhours             = 0
                prdmins              = 0
                prdmonths            = 0
                prdweeks             = 0
                sdlstrtdt            = starttime-sdlstrtdt
                sdlstrttm            = starttime-sdlstrttm
                strtimmed            = starttimeimmediate
                targetsystem         = host
           exceptions
                cant_start_immediate = 01
                invalid_startdate    = 02
                jobname_missing      = 03
                job_close_failed     = 04
                job_nosteps          = 05
                job_notex            = 06
                lock_failed          = 07
                others               = 99.
      if sy-subrc eq 0.
                                           "error processing
      endif.
    Regards,
    JOy.

  • Possible to generate graphics dynamically using ABAP?

    Hello friends,
    It is possible to generate graphics dynamically using ABAP as programming language? In the same line like SVG (Scalable Vector Graphics) or ChartDirector?
    Output of this abap program should be a picture.
    Daniel

    Hi Daniel,
    Have a look at URL
    http://help.sap.com/saphelp_nw04/helpdata/en/0c/5c55a8d0a611d2963100a0c9308b1f/content.htm
    Also have a look at SGRB Package/deveoplment class.
    Thanks
    Lakshman
    Message was edited by: Lakshman Tandra

  • Urgent !!!! Data pre-filling in dropdown

    Hii,
      I have created an offline scenario where a drop down list in interactice form is pre-filled using CAF service.when i run the service independenly it works fine returns me 6 rows.
    But when the data is mapped to the dropdown list of interactive form only one row is displayed.Can anyone plz help me out its Urgent.
    Regards
    Ishita

    Paul,
      Did you figure out how to do this? We have a very similar requirement now. Appreciate any suggestions you may have.
    Thanks
    Madhu

  • Changing physical path in FILE TCODE using ABAP CODE

    Hi all ,
    I want to change physical path linked to logical path in TCODE FILE dynamically using ABAP program. Is it possible.
    If yes then how?
    Thanks for your help.
    Regards,
    Uday.

    s

  • Possible to use JavaScript to Import Data from XML file to pre-fill fields?

    Hi,
    I have a dynamic fill-in PDF that I want to "pre-fill" internally in my company before sending out to users who will change any pre-filled fields necessary and answer questions we did not already answer.
    We do not have LiveCycle Reader Extensions, but we can use Acrobat to import data from an XML document to pre-fill the named fields.  Is it possibly to do this task using folder-level Javascript or some other method?  I can look into this, and post my findings, but I'd like to know if it's possible or if I need to use a different programming language.

    Hi,
    I am afraid that solution was for a specific client and I can't share it. If I get a chance I will mock up an example, but this wont be for a while. From memory it was just a straight importData method. This would normally fail silently in a non-certified form, but when the form is digitally signed/certified, it works without a hitch.
    Good luck,
    Niall

  • Is there any way to read to dynamic configuration using abap mappings?

    Hi,
      Is there any way to read dynamic configuration suppouse filename using abap mappings, I mean using abap code?
    Appreciate for your response.
    Regards,
    Daniel.LA

    Daniel,
    Yes it's possible. Please refer Henrique Pinto's reply in this thread -Re: Abap mapping and variable substitution in File adapter
    raj.

  • Have a combobox pre-filled using data from database

    What would be a recommended method to have a combobox
    pre-filled using data from database?

    You can load an Array with the data returned from your
    database and bind to that array as the dataProvider for the
    comboBox.
    [Bindable]
    private var myArrayDP:Array = new Array();
    //Load the array with your returned data.
    <mx:ComboBox dataProvider="{this.myArrayDP}">
    </mx:ComboBox>
    Using an ArrayCollection however is often better if you want
    changes to the dataProvider to automatically reflect in the
    ComboBox.

  • Pre-fill the filename in Fileupload UI

    Hi,
    I am unable to pre-fill the filename in fileupoad UI.
    When I launch the WD app, on the browser it get the following URL
    http://devai063.private.xxxx.com:8081/sap/bc/webdynpro/sap/zgi_file_upload?sap-language=EN
    at the end I add &filename=c:benefit.txt and hit enter,
    http://devai063.private.xxxx.com:8081/sap/bc/webdynpro/sap/zgi_file_upload?sap-language=EN&filename=c:benefit.txt
    In WD window HANDLEDEFAULT method I am checking for the filename parameter if not empty I am setting the 'filename'  to the context of filename of fileuploadUI, but the app does not show the file name C:
    benefit.txt in the fileupload UI.
    I debugged the HANDLEDEFAULT and I can see the filename but somehow it is not setting to the filname for uploadfile UI.
    any advice is highly appreciated.
    Thanks,
    Ram

    From the online help:
    Technical Browser Details Beyond the Control of WDA
    Due to browser restrictions that are unrelated to Web Dynpro ABAP, the previously entered data path might disappear when a FileUpload UI element is clicked. In newer versions of the browser, it is therefore impossible to enter the file name in the entry field. The field always remains empty. The selection of the file name is therefore only possible in new browser versions using the Browse... button. You cannot enter the file name manually (using the keyboard or the Copy and Paste functions) or by setting the file name from the back end (directly or using context binding). For more details, read the security-related information in Internet Explorer 6 about handling <input type=file>.
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/b3/be7941601b1d09e10000000a155106/frameset.htm

  • Filling the Sales Order Header - Source for filling the dropdown boxes

    Hi,
    I am trying to design the User Interface for Creation of sales order using the WebDynpro's. I want to know, what are all those BAPI's i need to use to fill the following drop down boxes.
    1. Order Type
    2. Sales Organization
    3. Distribution Channel
    4. Division
    As i am new to ABAP., and i am from Java background, i dont know much about the BAPIs used to get the above data.
    Could anyone let me know the source to fill those dropdown boxes. Thanks in advance.
    Thanks,
    Raghavendra

    Ah,my bad.
    Hmmm,i haven't found a BAPI's for filling all your dropdown-boxes with the valid values.
    What about using the FM "RFC_READ_TABLE" to read the values for your drowdown-boxes.(only if you don't want to write a Z*-Function).
    For examlpe for the dropdownbox "Sales Orgs",you can can start this FM for the table TVKOT.
    Is that a possilbe solution for you?
    Greetings
    Frank Brackmann

  • Address with Type 'Define Dynamically' using Global Data

    Hello,
    in a new created Adobe form Program Lines are no longer available. How can a global variable be set?
    The global variable is used in an Address as Dynamic Address Type.
    Thank you very much for your help.
    Kind regards, Marion Hergert

    hi,
    generally the global parameters will be declared and do some logic in the intrface. in the address node,for dynamic address type  parameter should be 3rd one ( am not sure), drag the global parameter into that field and  you can proceed further.
    The following logic I have used when I developed the forms when there is no address number.
    I think you can use the similar logic in your case.
    If your application makes no use of the Business Address Services but you still want to have country-specific addresses, you must use ABAP coding to achieve this. It is possible to do this in the application program or in the initialization coding of the interface. The example here describes the latter option. You need to call the function module ADDRESS_INTO_PRINTFORM. Among its parameters, you will find address_1. This structure contains all relevant address fields, like name, street, city, or country. These fields must be filled with the address data from your application. In other words, you must take care to create a correct mapping of the address fields from your application and the individual address fields of structure address_1.
    You should determine the value of parameter number_of_lines. It equals the maximum number of lines that will be created from the address data. Function module ADDRESS_INTO_PRINTFORM returns an internal table address_printform_table, which has only one column. Every line contains one line of the address that has been assembled according to the addressee's country. These lines need to be converted into a two-column internal table of type tline that can be used as the source of a dynamic text in a PDF form. Its two columns are:
    TDFORMAT - contains the paragraph format of the line (e.g. an asterisk for the default format)
    TDLINE contains the text itself.
    Addresses Without Business Address Services - Coding
    TYPE-POOLS: szadr.
    DATA:
      ls_address       TYPE adrs1,
      lt_address_lines TYPE szadr_printform_table,
      ls_address_line  LIKE LINE OF lt_address_lines.
    *map address fields from work area to fields from function module
    ls_address-title_text = is_customer-form.
    ls_address-name1      = is_customer-name.
    ls_address-street     = is_customer-street.
    ls_address-post_code1 = is_customer-postcode.
    ls_address-city1      = is_customer-city.
    ls_address-country    = is_customer-country.
    CALL FUNCTION 'ADDRESS_INTO_PRINTFORM'
      EXPORTING
        address_1               = ls_address
        address_type            = '1'                       "normal/company
        sender_country          = iv_sending_country
        number_of_lines         = 6
      IMPORTING
        address_printform_table = lt_address_lines.
    DATA: ls_dynamic_text TYPE tline.
    LT_DYNAMIC_TEXT would be defined as a global field
    of the interface as follows:
    lt_dynamic_text TYPE TABLE OF tline
    LOOP AT lt_address_lines
      INTO ls_address_line.
      ls_dynamic_text-tdformat = '*'.
      ls_dynamic_text-tdline   = ls_address_line-address_line.
      APPEND ls_dynamic_text TO lt_dynamic_text.
    ENDLOOP.
    pass this internaltable to the context. drag that table  in the layout.

  • I want to pre-fill the report

    I have some reports that are similar but are to be run according to sales rep. As I am in the process of doing this more automatically via email 'bursting', but in the meantime, they need these reports. So i am created one report for each rep. I would like to at least pre fill the rep name as report parameter and to use in the headings at the least. I put in one rep name as the default but it does prompt i would like this to run without the prompting having the name as it does. how do I do this?

    hi Paul,
    please see how to set up your reports readying them for a publication in this guide.
    you need to create a dynamic recipients list as per page 6 (using another report which is essentially a list of emails, names, etc.) as well as looking at the Personalization section. the personalization is what you've done already with the rep name as the prompt.
    -jamie

  • Add suffix to Project names?  Pre-fill Project description?

    Hi. I'm still working on my Ap3 workflow. Either of the actions in the subject would be most helpful:
    • *Add suffix to Project names*. I have 144 Projects I would like to rename by adding a few words to the end of their current names.
    • *Pre-fill Project Description*. The Project Description field can be found on the Project Information HUD ({Shift}+i with a Project selected). I would like to have all new Projects start with a default Project description. This could be put in from the import panel.
    I could alternatively make use of being able to append text to the Project Description field.
    Thanks.

    Hi Dave,
    When dealing with dropdowns the best event to use is the preOpen event. This means that there wouldn't be any script in the first dropdown.
    Then in the second dropdown you would have a relative simple script that would look back at the user's selection in the first dropdown and then populate the display items in the second dropdown.
    See examples here:
    http://assure.ly/jcTahK
    http://assure.ly/gcXx03
    http://assure.ly/fYCuQ2
    When adding an item to a dropdown, you can specify both the display item (what the user's sees) and the bound value (the value of the dropdown that is associated with the user's selection).
    So,
    this.additem("Clonmel", "(052) 1234567");
    This would add a city "Clonmel" to the dropdown and the value of the dropdown would be "(052) 1234567", if the user selected Clonmel.
    The textfield can then be given the same name as the dropdown and its binding set to Global (see the object > Binding palette when the textfield is selected).
    Hope that helps,
    Niall

  • Variable Substitution not working when using ABAP mapping

    Hi all,
    I am doing an IDoc to File scenario.
    Due to some complex mapping requirements, i had to use ABAP mapping for IDoc to File ( IDoc : SHPMNT05)
    There is also one more requirement where in i need to generate the receiver filename dynamically
    i.e the filename is of the form :     
        GW-XYZ-DD/MM/YYYY.csv
    Where
    XYZ is the Shipment number (E1EDT20- TKNUM)
    DD/MM/YYYY is the IDOC creation date in ECC (EDIDC-CREDAT)
    so i used the variable substitution option in receiver file adapter.
    But its not working.
    Is there any limitation for using the variable Substitution, doesnt variable substitution work in case of ABAP mapping?
    Regards,
    Loveena.

    Hi,
      u written ABAP mapping program to get the file name in the required format ,
    is it rt?
    when u test it at message mapping(including ABAP map program)
    u get the the required format of file name in the one of target filed.
    if that was fine, please check the variable substituiton parameters at receiver file adapter.
    i mean, are u maintain variable name and refernece.
    u have to specify the payload information.
    warm regards
    mahesh.

  • ALV Reports using Abap Objects ?

    <b>Hi All,
    I am trying to print the values in my internal table using ALV, using ABAP classes and objects. Here i am able to get the total succesfully. but i need to get subtotals also, like based on the carrid in table sflight i need subtotal of price for every carrid like 'LH' , 'SQ'.
    here is my code:</b>
    REPORT znav_report.
    DATA: alv TYPE REF TO cl_salv_table,
    value1 TYPE REF TO cl_salv_aggregations,
    value2 TYPE REF TO cl_salv_aggregation.
    DATA: BEGIN OF itab_flight OCCURS 0,
    carrid LIKE sflight-carrid,
    connid LIKE sflight-connid,
    fldate LIKE sflight-fldate,
    price LIKE sflight-price,
    paymentsum LIKE sflight-paymentsum,
    currency LIKE sflight-currency,
    END OF itab_flight.
    SELECT carrid
    connid
    fldate
    price
    paymentsum
    currency
    FROM sflight INTO TABLE itab_flight
    WHERE carrid = 'LH' OR carrid = 'SQ'.
    cl_salv_table=>factory( IMPORTING r_salv_table = alv
    CHANGING t_table = itab_flight[] ).
    CALL METHOD alv->get_aggregations
    RECEIVING
    value = value1.
    CALL METHOD value1->add_aggregation
    EXPORTING
    columnname = 'PAYMENTSUM'
    aggregation = if_salv_c_aggregation=>total
    RECEIVING
    value = value2.
    alv->display( ).
    <b>here how to get subtotals for every different carrid.
    regards,
    Navneeth.K</b>

    Hi,
    Make use of one of these statement,,,,
    <b>Either</b>
    <b>(a)</b>  select carrid connid fldate price currency planetype into table itab_flight from sflight.
    <b>or</b>
    <b>(b)</b>  select * into corresponding fields of table itab_flight from sflight.
    <b>(a)</b> is better in performace than<b> (b)</b>
    <b>But before that, please note some performance related issues with OO Context...</b>
    1. When defining an Internal table, avoid occurs specification, It is Obsolete,Make use of Initial Size n.
    2. Declare Workarea separately,since Internal table defined along with header line is Obsolete in OO Context.Its better and more robust to fill the itab and fetch the values from itab using a separate Workarea rather than the header line... So avoid header lines...
    3. When defining an internal table, follow this way ....
          Define a Linetype (Field String) using the TYPES Statement
          TYPES: begin of ty_line,
                      f1 type i,
                      f2 type i,
                      end of ty_line.
          Then define a Table type using TYPES Statement...
         TYPES: ty_lines type standard table of ty_line with default key.   
      "there is differnnce between line and lines..... make it clear..."
        Then after, define the internal table and its work area using DATA statement... as shown below..
    DATA: i_lines type ty_lines,
              wa_lines like line of i_lines
    <b>This is the standard way of defining the internal table under OO Context.,,..
    Your definition is creating a default header line....that should be avoided...</b>
    Thanks for ur patience,
    Regards..
    Mohammed Anwar..

Maybe you are looking for

  • Netmask Changes in Solaris 10

    Hi Team, We tried to change the netmask and broadcast address in solaris 10 by below steps ifconfig ipge0 down ifconfig ipge0 <ipaddress> netmask <subnet mask> broadcast <address ifconfig ipge0 up But interface is not up. The command (ifconfig ipge0

  • Problem with playing video via composite av cable on iPod classic 2009 model 160gb

    Things went well, after  purchasing the new Ipod classic 160 gb i tryied to watch movies on my LED TV via Composite AV Cable.  I did it once. Everything worked correctly & I was able to see my photoes, watch movies.  Today i tryied to connect it agai

  • Oracle 10g to SQL Server

    Hi All, We have established a connection between ORacle and SQL Server, When I query in TOAD. It works fine e.g. this statement works fine in TOAD: select * from JDETAIL@ex_test But when I try to execute the following statement from PL/SQL BLOCK. It

  • Applet

    I have seen embedded applets all over the WEB. I am sure there is a way to get an applet to come off of a standalone after clicking a link on a web page. Can someone help me with this. Thanks in advance.

  • Wireless printing from main Mac not working

    I've read through a few threads about wireless printing issues via the TC but I have a twist. My second Mac (Macbook 10.4.11) is able to print wirelessly through TC without a problem. I've selected the appropriate printer via System Preferences>>prin