Structures-- to populate the field

how to populate the fields in the internal table , in which the fields are in structure.

Use select query to populate the fields in the internal table.
e.g. -
  Types (ty_)
TYPES:
        BEGIN OF ty_alv_output,
          vbeln         TYPE vbeln,
          vbtyp         TYPE vbtyp,
          auart         TYPE auart,
          NETWR         TYPE NETWR_ak,
          WAERK         TYPE waerk,
          VKORG         TYPE VKORG,
          VTWEG         TYPE VTWEG,
          SPART         TYPE SPART,
          VKGRP         TYPE VKGRP,
          VKBUR         TYPE VKBUR,
          GSBER         TYPE GSBER,
          matnr         TYPE matnr,
        END OF ty_alv_output,
      ty_table_alv_output   TYPE STANDARD TABLE OF ty_alv_output.
  Internal tables(gt_)
DATA :
      gt_alv_output   TYPE STANDARD TABLE OF ty_alv_output.
  Work area
DATA :gs_alv_output   TYPE ty_alv_output.
  Selection screen data
    select-options   (s_)
      parameters     (p_)
      radio buttons  (r_)
      checkboxes     (x_)
      pushbuttons    (b_)
SELECTION-SCREEN  BEGIN OF BLOCK block1 WITH FRAME TITLE text-f01.
SELECT-OPTIONS:
s_vbeln  FOR vbak-vbeln,                       "Sales Document
s_vbtyp  FOR vbak-vbtyp,                       "SD document category
s_auart  FOR vbak-auart.                       "Sales Document Type
SELECTION-SCREEN  END OF BLOCK block1.
START-OF-SELECTION.
SELECT  vbeln
          vbtyp
          auart
          netwr
          waerk
          vkorg
          vtweg
          spart
          vkgrp
          vkbur
          gsber
          matnr
     INTO CORRESPONDING FIELDS OF TABLE gt_alv_output
           FROM vbak
              WHERE vbeln IN s_vbeln
                AND auart IN s_auart
                AND vbtyp IN s_vbtyp.
This selct query will fill the data in internal table.
Plz reward if found helpful
Thanks

Similar Messages

  • How to populate the field Discount Percent (DIS) in the outbound S1ORDEXC?

    Hello all,
    I am working with the Spec2000 to send out the IDOC S1ORDEXC.
    Does anyone know how to populate the field Discount Percent (DIS)?
    This field length of Discount Percent is 2 characters, but our customer discount in the Princing Conditions (Sales Order) is longer than 2 characters (ex:  7.500-%)
    Thank you

    Hello Thuan
    I guess you are working with IS- ADEC and SPEC 2000. I am not an expert on this but leave you some hints from OSS notes I came across.
    It appears like Discount Percent - DIS and Procurement Discount Percent -PDP are complementary and mutually exclusive. If one exists, the other need not.
    Looks like DIS is computed as (100-PDP)/100 and it is just a 2- integer data (as in 20 Percent). It is a kind of multiplier (Factor), example if  PDP discount is 10 percent, then DIS (Factor) is 0.9 and so  final (net) price after discount = Price*0.9.
    " If the discount comes in the S1BOOKED inbound into SD in the field DIS, then the discount has to be sent back in the DIS field .. if it came in the PDP field then it has to be sent back in the PDP field. If there was no discount in the incoming IDoc, then the discount has to be filled in the PDP if there was a change in the discount".
    KDATE in SPEC 2000 file maps to DIS and KPERC to PDP.
    PDP has 4 characters and per OSS note 440380, the point is ignored meaning you can work with 1225 instead of 12.25.
    So may be you can work with PDP?
    OSS notes: Apply to older releases but may still be applicable conceptually speaking.
    456153 - S1ORDEXC does not send out Discount
    440380 - PDP has only 4 characters in the SPEC IDoc instead of 5
    596042 - Discount percent DIS not considered e processing S1ORDEXC
    698668 - Incorrect calculation of unit price for PO item by S1ORDEXC
    Let me know you final findings.

  • How to populate the field VTTK - EXTI1 in the shipment

    Hi there,
    I have a situation where I need to populate the field VTTK - EXTI1  with certain values, I would like to know if there is a user exit or badi to do this.  Actually the field is empty and it's possible to enter any value.
    Thanks in advance
    Regards

    I have found in the screen of shipments a program where the logic of PBO PAI could be changed.
    INCLUDE mv56aozz.                      " User-modules PBO
    INCLUDE mv56aizz.                      " User-modules PAI
    However in the field vttk-exti1 I don't know how can I asociate a custom match code to this field using Abap code.
    Any help will be appreciate.
    Thanks in advance.
    Alexis

  • How to populate the field after execution of the application

    Hello gurus,
    I am creating one application and need your help. on my webdynpro screen I have few fields, out of these user will enter some and one field I want to populate when user hit enters. My application is to create a sales order, user will enter the details and hit create button that will create the sales order. Now what I want is when the sales order is created on the same screen the sales order number should also be displayed in the field : VBELN. Can you please tell me how can I get this.
    Thank
    Rajeev

    Hi Rajeev, if I understand you want show in a field that was created the VBELN after execute BAPI, well I assume that this field is binding with context document->Att_VBELN. You can use the code below.
        DATA lo_nd_document TYPE REF TO if_wd_context_node.
        DATA lo_el_document TYPE REF TO if_wd_context_element.
        DATA ls_document TYPE wd_this->element_document.
        DATA lv_att_vbeln TYPE wd_this->element_document-att_vbeln.
        lo_nd_document = wd_context->get_child_node( name = wd_this->wdctx_document ).
        lo_el_document = lo_nd_document->get_element( ).
        IF lo_el_document IS INITIAL.
        ENDIF.
       lv_att_vbeln = <<RETURNED VBELN FROM BAPI>>.
        lo_el_document->set_attribute(
          name =  `ATT_VBELN`
          value = lv_att_vbeln ).
    Regards,
    Edson Thomaz

  • How to populate the fields in a report.

    Hi,
    I've created a function module which calls a report. The report generates a file with sequence no. in the application server.
    The problem now is that I want the data from the presentation layer but the Z-Report doesn't generate any output with data except generating a file in the application server.
    What can be the options to generate the data without changing the report. Is there anything which I can do in the function module to retrieve the data.
    Thanks in Advance.
    Sreedhar.

    Hi,
    First of all Thank you for the quickest response.
    Ok I'll download the file to presentation server, "But the problem is that in the application server the files are created with a sequence no. and which I cannot hardcode in the function module." These sequence nos. are generated everytime the report is run.
    If I use the download to presentation layer than I'll be using the application server atleast once but I shouldn't use the application layer at all.
    How can I resolve this issue then?
    Sreedhar.
    Edited by: Sreedhar Av on Sep 25, 2009 12:26 PM

  • How to populate the new field of R/3 in BW

    Hi,
    There was a requirement to modify the sap screen in the R/3.
    For the same a new field is created which populate the data via a table in R/3.
    Now I have to populate the same field in BW. I am working on 3.5 Version.
    In R/3 I have a data source and I am not able to see the same available in the data source
    The field is available in the extract structure but I am unable to populate the same in the data source.
    Kindly help.

    The Data Source is picked from the FM.
    Also,my requirement is to display the text values for the new field
    I am going to create a Generic Master Data which will fetch the data from the table which has fields (Code, Langu and the text) and replicate the same to BW.
    Now to populate the code in BW, I need to have the field in the data source and from there I can add the same code field in the bw comm/tran/etc...
    The code is available in the Extraction and not in the data source.
    At the reporting level I will extract the report based on key and text.
    I tried using ROOSFIELD to populate the field in the datasource, but I am not able to do the same.

  • Structure changes in the LBWE, where does the field pool come from MCVBUK

    Example:  Customising Cockpit, lbwe > 2lis_11_vascl > Maintain structure
    In lbwe the field 'pool' for MCVBUK does not have all the fields that I can see if I look at Structure          MCVBUK using se11 such as FKSTK, FKSAK.
    What does this depend on ?  Is it to do with the events ?
    Yet OSS Notes say to choose the fields from lbwe:
    structure changes in the LBWE SAP Note Number: 762951
    Note 576886 - Change to user-defined fields not extracted

    But enhancing extract structures, you don't get the delta capability on the  sepcific field (if you need it) - and there is no simple solution to this.
    I found these OSS notes:
    <b>Note 328255 - Not all fields provided in Customizing Cockpit</b>
    This behavior is wanted. As not all fields of the communication structures can be used in a practical way, some are hidden. Fields are hidden for the following reasons:
              o The field is not filled for this event.
              o The field is only used internally (for example the work center ID - instead, the respective work center name is available).
              o The field should not be used here for reasons of design. Principally, you should select key figures only from the most detailed communication structure (or from the one with the most detailed hierarchy) and only the characteristics from all communication structures.
    <b>Note 351214 - BW extraction SD: Restricted field selection</b>
    This note goes into more detail
    By the way, thanks for the replies, but the question was 'why ?' and I the OSS notes replied to this.
    The whole problem is to do with 'delta' enabling, and I've spent a day researching to find that there is no easy way to delta enable enhanced extract structure fields.

  • Code for populating the field

    Hi,
    can any one help me out for populating the appended field to data source.
    <u><b>My requirement:</b></u> I have enhanced the data source 2lis_11_vahdr by appending the field zzmatnr in to its extract structure, Now i want to populate this field from the field available in the MARC table. so can any one help me out the whole code for this?
    apart from this i have one another question that is if i append this field to the communication structure( like mcvbak, mcvbap... etc) then how we will populate this field.
    and what is the exact difference between appending the field to the extract structure and appending the field to the communication structure.
    Thanks

    1)Just a sample code to add old material code(zzoldmatno) to the data source
    '2LIS_02_S012'.
    The function module is EXIT_SAPLRSAP_001.
    You have write the code in the include zxrsau01.
    when '2LIS_02_S012' .
    data : it_s012biws like s012biws .
    tables : mara .
    loop at c_t_data into it_s012biws .
    l_tabix = sy-tabix.
    select single bismt from mara into mara-bismt where matnr =
    it_s012biws-matnr.
    if sy-subrc = 0.
    it_s012biws-zzoldmatno = mara-bismt .
    endif.
    clear mara-bismt .
    modify c_t_data from it_s012biws index l_tabix.
    endloop.
    2) Replicate the datasource.
    3) Now with the above code datasource R/3 part is finished.To receive the new column at the BW end you have to add a column to your ODS or infocube as well to the communication structure(say ZOLDMAT in my case) and map the new field(ZZOLDMATNO) to the field (ZOLDMAT).
    4) Activate the Transfer Rule.
    Hope this helps.
    Regs
    Gopi.

  • How to update/copy into the fields of standard table

    Hi all,
    I have a piece of code in user exit, in which i have to populate the field atwrt (cntry of origin) in EIPO-HERKL in a delivery document..
    but if i assign it directly to the field as i've shown in code, it wont take it.
    moreover, it looks be a standard table(EIPO), but it is not.. its  a work area..
    READ TABLE i_val_tab WITH KEY atnam = c_cntr.
    IF sy-subrc = 0.
    EIPO-HERKL = i_val_tab-atwrt.
    MODIFY EIPO.
    ENDIF.
    so kindly guide me how to do dat..do i have to populate it in some other standard table(for country of origin field) which will automatically put the field in EIPO-HERKL?

    Hello Pradeep,
                          Generally, in most of the User Exits, we'll find something called X and Y Structures. For example, XVBAK and YVBAK where the X Structure contains the Old Value and the Y Structure contains the New Value (meaning, the Value that is currently on the Screen before Saving). So, try to find out similar structures through which you can update the Value in the Standard Table.
    Thanks and Regards,
    Venkat Phani Prasad Konduri

  • How to populate text fields with data present in a table

    Hi,
    The page i'm building has got a select list for the primary key column and text fields corresponding to rest of the columns in the table.
    upon selecting some value from the list, the data corresponding to that row should get populated in the respective items. I don't want to add source in each item. can't i create a process or something else where this is done for each item.
    for eg there's a table with columns A(primary key) and B.
    there is a text fields on this page.
    this textfield should populate the data from the table whenever i submit the page such that teh value in B is select B from tablename where A = the selected value.
    Thanks
    Dhirendra

    So I assume page was not built using a wizard. Why on earth you would want to I dont know, but you could create an "After Header" pl/sql process to populate the relevant fields, assuming the id was know on entry to the page. If you want to select the id on the page and then populate the fields, guess you will need to use a "Text Field (always submits page when Enter pressed)" and then use an "On Submit" process to populate the items.
    If you are using an Automated Row Fetch, remember to select "Set memory Cache on Fetch" in that process.
    Hope this helps.

  • How can i post the fields in the screen by selecting a record

    Hi,
      I have a problem in dialog programming.
      I need to populate the fields in the screen by selecting a single record.
      For example,
        Screen consists of 'CARRID, CONNID,FLDATE... fields.
        By pressing F4 in CARRID field it will display the contents from database table and display the records. If i select the record LH 0400 ... record then automatically the connid field should fill with the contents of the record i.e., 0400 and similarly the remaining fields.
       How can i do this in dialog programming?
       I tried with F4IF_INT_table_.. function module. There is a table parameter DYNmapping. But dont know how to use it? Can any body explain me how to use it?
       Thanks in advance..
       Suvan

    Hi Vinod,
      Thanks for your reply. I solved my problem. It is working with the table parameter 'DYNPFLD_MAPPING' in the function module 'F4IF_INT_TABLE_VALUE_REQUEST'.
      With your logic we can't decide which record is selected. Because there can be multiple records for a single CARRID.
      My question is how to post the entire record into the screen fields at a time? It is possible with the parameter I specified inthe above said function module.
      With dictionary reference it will fetch the entire entries from the Check table.
      Thanks again for your co-operation.
      Suvan.<b></b>

  • Using an event in table maintenance view to populate a field

    I have a table maintenance view, and I would like to populate one field of the table with derived data. I am trying to do this by coding a routine for one of the events, but so far no luck. I have been able to chege the data in the TOTAL table, but still it does not populate the field on the screen.
    Note this is not for one row as it is entered, but I want all rows of the table displayed to show this field with derived data.
    So the question is: what is the correct event to use, and what is the correct internal table to update? Can I make changes to EXTRACT or TOTAL to do this?
    Kind Regards,
    Tony.

    Hi Rob,
    Sorry for being lazy; I'll close this and off and search :-}
    BR,
    Tony.

  • How to auto populate a field based on drop down list unless specific item is selected

    Hi all,
    Apologies if I have posted this in the wrong area but I am new to Adobe LiveCycle, JavaScript and these forums.
    I am trying to build an Acrobat form using LiveCycle but am having trouble with the drop down lists.
    Inititaly I simply wanted to populate fields in one table based on the selection of a corresponding drop down list in another table.
    I used the following code and it worked fine:
    Workbook.Content.Table1.Row3.AppropriationDetails.Row4.Cell1::change - (JavaScript, client)
    var fFrom = xfa.resolveNodes("Workbook.Content.Table1.Row3.AppropriationDetails[*].Row4.Cell1");
    var fTo = xfa.resolveNodes("Workbook.Content.Table2.Row3.AppropriationDetails[*].Row4.Cell1");
    for (var i=0; i <= fFrom.length-1; i++) {
         fTo.item(i).rawValue = fFrom.item(i).boundItem(xfa.event.newText);
    The problem is that now I want the above code to work UNLESS one of the items in the dropdown list is specifically selected in which case I want the text box in the other table to display a message such as "Enter details in the field below".
    I have tried to create an If Else statement using the following code:
    Workbook.Content.Table1.Row3.AppropriationDetails.Row4.Cell1::change - (JavaScript, client)
    var fFrom = xfa.resolveNodes("Workbook.Content.Table1.Row3.AppropriationDetails[*].Row4.Cell1");
    var fTo = xfa.resolveNodes("Workbook.Content.Table2.Row3.AppropriationDetails[*].Row4.Cell1"); 
    for (var i=0; i <= fFrom.length-1; i++) {
         if (fFrom.item(i).rawvalue = "Option 3"){
         fTo.item(i).rawValue = "Enter details in the field below";
         else {
         fTo.item(i).rawValue = fFrom.item(i).boundItem(xfa.event.newText);
    The code now populates the field with "Enter the details in the field below" no matter what item I select from the dropdown list.
    Your help is greatly appreciated.
    Cheers,
    ozzy_q

    Follow Up:
    Ok so ive changed things up a bit and have had some more success.
    I have used a Switch statement in my For loop to perform different actions based on the item selected.
    The code looks like this:
    Workbook.Content.Table1.Row3.AppropriationDetails.Row4.Cell1::change - (JavaScript, client)
    var fFrom = xfa.resolveNodes("Workbook.Content.Table1.Row3.AppropriationDetails[*] .Row4.Cell1");
    var fTo = xfa.resolveNodes("Workbook.Content.Table2.Row3.AppropriationDetails[* ].Row4.Cell1");
    for (var i=0; i <= fFrom.length-1; i++) {
         switch (fFrom.item(i).rawValue)
         case "Option 3":
         fTo.item(i).rawValue = "Enter the details in the field below";
         break;
         default:
         fTo.item(i).rawValue = fFrom.item(i).boundItem(xfa.event.newText);
         break;
    This code solves my problem but has thrown up a new issue:
    When i select Option 1 or 2 from the dropdown list  the change in the text field is instantaneous, however if I select Option 3 it wont appear in the text field until I either select Option 3 a second time or select another item. Its as if the text field is a selction behind what I have enterd in the dropdown list.
    Any thoughts?

  • Required item no: to populate custom field while creating item for a Sales order

    Hello Experts,
    I have created a custom field for item data of sales order using AET .
    I want to populate this field automatically when ever we create a new item for a sales order using UI or CRMD_ORDER or WCEM by concatenation Sales order number and item number.
    We are getting Item GUID but not getting the item number(need item number before getting saved is their any chance to get item number from item GUID ) to populate the field and save it.
    For this we tried using BADI's
    CRM_BTX_EXTENSIONS
    CRM_ORDERADM_I_BADI
    Thanks in advance,
    Manasa Veena P.

    Where did you add the field ?

  • Can Word 2010 populate fillable fields in a pdf fillable form?

    Is it possible to define fillable fields in a word 2010 document (name, address, city, state, zip, date) so that after a save to pdf and [Page] add existing file, an existing pdf fillable form will auto-populate same named fields in the added pdf fillable form?

    Thanks, George!  In the form I am creating, I ask respondents to identify a number of organizations that they work with.  For example, I ask "Please list up to ten organizations" and then I provide ten text boxes for organizations 1-10.  I then ask a series of follow up questions (radio buttons, check boxes, and rating scales) about each organization.  I would like to auto-populate the fields of those follow up questions with the names of the organizations that the respondents had written.  Does that make sense?  Will this require JavaScript?  My hope is to avoid complicated scripts that may give respondents technical problems with the form.  Thanks again,
    Andy

Maybe you are looking for

  • Possible to change the charset of a Web Dynpro Application ?

    Hello All,   Does anyone knows if this is possible ? To be able to change the charset of a Web Dynpro application or even changing it dynamically ? Thank you. from Kwok Wei

  • Can't Airprint  with HP Airprint printer

    My iPad 2 (ios 5.1) recently stopped printing on an HP Laserprint P1102w (which is an Airprint printer).  It was printing fine for months.  Now, when I try to print, it cannot find the printer.  My Macbook Air and iMac continue to print remotely (via

  • HOW TO UNLOCK/RESTORE IPHONE 3

    i reciently purchased a iphone 3 and it HAS A PASSWORD ON IT. HOW O I UNLOCK OR OVERRIDE PASSWORD SO THAT I CAN RESTORE PHONE?

  • How to start wmii-hg?

    Hello-- I'm  a new Arch user. I was able to install Arch and get wmii up and running. I wanted to configure wmii such that the tag/status bar was at the top of the screen. On this forum (the wmii thread), I found the suggestion to run wmiir xwrite /c

  • HT4818 how to resize windows partition

    How do you resize the windows partition in boot camp?