How to pull field data if it is structure

Dear experts,
In  va01 in account assignment  we have profit segment. In profit segment we have cost centre for (co -moudle) which is structure field.
My requirment is to pull cost centre data in the user exit.  can anybody help me.
regads.
Shashi

Hi ,
even if a structure is given there , it does not mean you will get data from there you you will be able to uodate data there. Structures never store data at any point of time.
So you need to find out the corresponding  table see this  VBAP (KOSTL)
Give the document number/item no as a selection criteria  and fetch KOSTL from VBAP.
Hope this is helpful.
Regards,
Uma Dave

Similar Messages

  • How to pull the data into smartform after designing layout?

    how to pull the data into smartform after designing layout?

    call the smartform in your Driver program and pass your output internal tables in the smartforms paramaters
    Check the below Sample code.
    FORM label_print.
      DATA : g_fm_name TYPE rs38l_fnam,
             g_output  TYPE ssfcompop,
             g_control TYPE ssfctrlop,
             g_form TYPE tdsfname VALUE 'ZPRINT_LABELS',
             g_dest TYPE rspopname,
             g_printer TYPE rspoptype..
      REFRESH : i_out[],i_qals[].
      SELECT matnr maktx
             INTO TABLE i_out
             FROM makt
             FOR ALL ENTRIES IN i_mseg
             WHERE matnr = i_mseg-matnr
             AND   spras = sy-langu.
      SELECT prueflos objnr ersteldat erstelzeit matnr revlv charg mengeneinh
             INTO TABLE i_qals
             FROM qals
             FOR ALL ENTRIES IN i_mseg
             WHERE matnr = i_mseg-matnr
             AND   charg = i_mseg-charg.
    *FM to accept the device type and returns the short name of the output device
      CALL FUNCTION 'EFG_GET_PRINTER'
        EXPORTING
          x_no_dialog  = ' '
          x_obligatory = 'X'
        IMPORTING
          y_tddest     = g_dest
        EXCEPTIONS
          cancelled    = 1
          failed       = 2
          OTHERS       = 3.
    *device type name for the output device
      SELECT SINGLE patype                                  "#EC CI_NOFIELD
             FROM tsp03d
             INTO g_printer
             WHERE padest = g_dest.
    *printer setting
      g_control-no_dialog = 'X'.
      g_output-tdarmod = '1'.
      g_output-tdcopies = '001'.
      g_output-tddest = g_dest.
      g_output-tdprinter = g_printer.
      g_output-tdnewid = 'X'.
      g_output-tdimmed = 'X'.
      CLEAR wa_mseg.
      LOOP AT i_mseg INTO wa_mseg.
        READ TABLE i_out INTO wa_out WITH KEY matnr = wa_mseg-matnr.
    check for the status and filter the records
        CLEAR : wa_qals.
        LOOP AT i_qals INTO wa_qals WHERE matnr = wa_mseg-matnr
                                    AND charg = wa_mseg-charg.
          CALL FUNCTION 'STATUS_TEXT_EDIT'
            EXPORTING
              objnr            = wa_qals-objnr
              spras            = sy-langu
            IMPORTING
              line             = l_status
            EXCEPTIONS
              object_not_found = 1
              OTHERS           = 2.
          IF l_status CS 'LTCA' OR l_status CS 'SKIP'.
            DELETE i_qals.
          ENDIF.
        ENDLOOP.
        SORT i_qals BY ersteldat DESCENDING erstelzeit DESCENDING.
        IF i_qals IS INITIAL.
          l_msg = text-002.
        ELSE.
          READ TABLE i_qals INTO wa_qals INDEX 1.
          SELECT prueflos vbewertung
                 INTO TABLE i_qave
                 FROM qave
                 WHERE prueflos = wa_qals-prueflos
                 AND   kzart = 'L'.
          IF sy-subrc <> 0.
            l_msg1 = text-003.
          ENDIF.
          SORT i_qave.
          CLEAR : wa_qave.
          IF NOT i_qave IS INITIAL.
            READ TABLE i_qave INTO wa_qave INDEX 1.
            IF wa_qave-vbewertung = 'A'.
              l_msg = text-002.
            ELSEIF wa_qave-vbewertung = 'R'.
              l_msg1 = text-003.
            ELSE.
              l_msg1 = text-003.
            ENDIF.
          ENDIF.
        ENDIF.
        CLEAR : wa_ser03.
        READ TABLE i_ser03 INTO wa_ser03 WITH KEY mblnr = wa_mseg-mblnr.
    *Calling Smartform
        CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
          EXPORTING
            formname           = g_form
          IMPORTING
            fm_name            = g_fm_name
          EXCEPTIONS
            no_form            = 1
            no_function_module = 2
            OTHERS             = 3.
        LOOP AT i_objk INTO wa_objk WHERE obknr = wa_ser03-obknr.
    *Calling FM generated from the smartform
          DATA : l_date(10) TYPE c,
                 l_date1(10) TYPE c,
                 l_date2(10) TYPE c,
                 l_date3(10) TYPE c,
                 l_hyphen(1) TYPE c VALUE '-'.
          CLEAR : l_date,l_date1,l_date2,l_date3.
          l_date1 = wa_mseg-vfdat+0(4).
          l_date2 = wa_mseg-vfdat+4(2).
          l_date3 = wa_mseg-vfdat+6(2).
          CONCATENATE l_date1 l_hyphen l_date2 l_hyphen l_date3 INTO l_date.
          CALL FUNCTION g_fm_name
            EXPORTING
              control_parameters = g_control
              output_options     = g_output
              user_settings      = ' '
              g_matnr            = wa_mseg-matnr
              g_mat_text         = wa_out-maktx
              g_batch            = wa_mseg-charg
              g_rev              = wa_qals-revlv
              g_edate            = l_date
              g_lot              = wa_qals-prueflos
              g_qty              = wa_mseg-erfmg
              g_uom              = wa_mseg-erfme
              g_serial           = wa_objk-sernr
              g_smsg             = l_msg
              g_fmsg             = l_msg1
            EXCEPTIONS
              formatting_error   = 1
              internal_error     = 2
              send_error         = 3
              user_canceled      = 4
              OTHERS             = 5.
          CLEAR  g_output-tdnewid.
        ENDLOOP.
        IF sy-subrc <> 0.
          CLEAR : l_date,l_date1,l_date2,l_date3.
          l_date1 = wa_mseg-vfdat+0(4).
          l_date2 = wa_mseg-vfdat+4(2).
          l_date3 = wa_mseg-vfdat+6(2).
          CONCATENATE l_date1 l_hyphen l_date2 l_hyphen l_date3 INTO l_date.
          CALL FUNCTION g_fm_name
            EXPORTING
              control_parameters = g_control
              output_options     = g_output
              user_settings      = ' '
              g_matnr            = wa_mseg-matnr
              g_mat_text         = wa_out-maktx
              g_batch            = wa_mseg-charg
              g_rev              = wa_qals-revlv
              g_edate            = l_date
              g_lot              = wa_qals-prueflos
              g_qty              = wa_mseg-erfmg
              g_uom              = wa_mseg-erfme
              g_serial           = wa_objk-sernr
              g_smsg             = l_msg
              g_fmsg             = l_msg1
            EXCEPTIONS
              formatting_error   = 1
              internal_error     = 2
              send_error         = 3
              user_canceled      = 4
              OTHERS             = 5.
          CLEAR g_output-tdnewid.
        ENDIF.
      ENDLOOP.
      IF sy-subrc = 0.
        MESSAGE i000(zm).
      ENDIF.
    ENDFORM.                    " label_print

  • How to pull the data using READ_TEXT

    Hi,
        I was trying to use the READ_TEXT function module to pull the data from the sales order, but i am not sure what are the values exactly i need to pass.
    ID
    LANGUAGE
    NAME
    OBJECT
    Since the above parameters are mandatory to get the text from sales order ... can you please suggest me. We are using customized screen ... if user enteres the data in the long text field in the customized screen - it should be updated in the sales order... how can i achieve... can any one suggest me
    regards
    jaya

    Hi,
    In that text TC --> come to change mode >menu goto->header.
    There you find all info.
    aRs

  • How to pull the date parameter to appear in the report template?

    Hi Gurus, and Experts,
    I need to pull the date parameter I selected in BIP to appear in my report template? How to code this in BIP?
    Identifier are: dto and dfrom
    date fromat string: MM-dd-yyyy
    Regards,
    JP
    Edited by: user10955574 on Nov 10, 2010 2:38 AM
    Edited by: user10955574 on Nov 10, 2010 2:39 AM

    Declare the parameter in the template as
    <?param@begin:param1?>
    and use it as <?$param1?>

  • How to force field to appear in input structure in content conversion

    Hi all,
    I am doing file content conversion in sender File adapter. Here is the structure
    Header
    Body
       field1 - length 2
       field2 - occurrence 1:1, length 3
       field3 - length 2
       field4  length 2
    Trailer
    Here is the fixed length file that is inputed into XI
    <b>header22   2211trailer</b>
    field2 occrence is 1:1 and as you se from the file example field2 from the body is empty(just space).But  When I do the content conversion I don;t have this field showing up in my structure!??!!
    I want to make sure that field2 appears even as empty field because that is screwing my mapping!?
    Can you please have any idea how to make sure that field is in my input structure when I pass spaces?Can I force it somehow?
    Thanks all.

    Hi Jon,
    Yes you are right.
    For Ex: ur XML is
    <1>a</1>
    <2>b</2>
    and sometime is there is no value ur FCC will become
    <1>a</1>
    So what you have to do is in the message mapping take the source element
    if <2> exists then <2>---->Target
    else
    <2>---->Constant(space)
    and this "exists" is a standard function in NodeFunctions.
    Regards,

  • How to pull AD data into a custom SharePoint list?

    We want to pull in all the active directory user data like username, first name, last name and address into a custom SharePoint list.
    Is this possible?

    There is no OOOB way. But you can achieve this with custom code.
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/8f441d97-e4f9-4e80-891b-f4f4b5fb9457/how-to-populate-a-sharepoint-2010-list-from-the-active-directory-how-to-populate-a-sharepoint-2010?forum=sharepointdevelopmentprevious
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/903afa85-6e23-451e-b84a-d519cb2ddf9c/creating-a-list-of-data-pulled-from-ad?forum=sharepointdevelopmentprevious
    Bala
    Can we sync the hidden User Info list with AD? Is this an OOTB sharepoint feature?

  • How to get field data using a formula

    I have a table with fields ‘pension contribution’ and ‘current year’.The first field stores a single record for a given year.Say if ‘current year’ is 2014 ‘pension contribution’ is 7% and so on.
    I wanted to get a result by providing a certain year from another field in a table using a formula.
    How do I do this?An explanation would be helpful.

    Hi Nebil,
    You can't! You'll need to join the the two tables or use a Subreport.
    -Abhilash

  • How to set fields contained in an input structure as not mandatory in WSDL

    Hi all,
    I hope someone can help me sort out a problem I've been having recently.
    I'm generating a WSDL from a function module, which has a structure as the only input parameter. This structure contains a number of fields, which need to be presented as not mandatory in the WSDL descriptor.
    I modified the function module by setting the structure and all its contained fields as not mandatory, but when I generate the related WSDL it shows the structure as optional and its subfields as mandatory.
    Below is a snippet of the WSDL:
    <xsd:element name="Zk4RfcTibcoFatt">
       <xsd:complexType>
          <xsd:sequence>
             <xsd:element name="XZk4Headprev" type="tns:Zk4Headprev" minOccurs="0" />       <-- optional structure
          </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
    <xsd:complexType name="Zk4Headprev">
       <xsd:sequence>
          <xsd:element name="RecordType" type="n0:char4" />                                                    <-- non optional parameters
          <xsd:element name="IdricTecn" type="n0:char15" />
          <xsd:element name="IdricFour" type="n0:char15" />
          <xsd:element name="CodOperaz" type="n0:char4" />
       </xsd:sequence>
    </xsd:complexType>
    I can't understand why the stucture's elements are not defined as optional in the WSDL, while they're configured as optional in the function module definition. I'd expect a minOccurs="0" added to each structure's element definition.
    I even tried modifying manually the WSDL from SE80, but it seems it can't be altered in any way.
    Has anyone  a solution to this problem?
    Thanks in advance.
    Best Regards.

    I tried to do that, but I can't manage to edit the WSDL in SE80, is there a way to do it?
    I also tried modifying the WSDL in an external editor, but I can't find a way to switch the edited one with the original one in SAP.
    Can you please help me on that?
    Thanks in advance for any help you can give me.

  • How to correct wrong data in SIS info structures

    Hi,
    Let's say at some point in time I configured the LIS wrongly such that the Sxxx (e.g. S001) tables were wrongly updated when I completed the sales order.
    So now I go back to the LIS configuration to correct it, the Sxxx tables data remain the same.
    Anybody knows which program I should run to correct the wrong data in the Sxxx tables? I have search in OSS notes and in this forum but could not find.
    Thanks!

    Hi Hweeling,
    You can remove the incorrect data from info-structure using transaction <b>OLIX.</b>
    Then you can reload the data using transactions:
    <b>OLI7 : Sales Order
    OLI8 : Delivery
    OLI9 : Billing</b>
    Be very careful when you execute transaction <b>OLIX</b>, delete only the <b>specific Sales Document</b> data which you want to. Then also reload those specific <b>Sales Document data.</b>
    Hope this helps ...if yes then pls reward  liberally
    Kind Regards
    Sachin Bhonsle

  • How to pull data from EJB and present them using Swing ?

    Hi all,
    I've written stateful session bean which connect to Oracle database, and now I must write stand alone client application using Swing.
    The client app must present the data and then let users add,delete and edit data and it must be flexible enough to iterate through the records.
    The swing components can be JTextField,JTable etc.
    How to pull the data from EJB and present them to users with the most efficient network trip ?
    Thanks in advance
    Setya

    Thanks,
    Since the whole app originally was client-server app and I want to make it more scalable, so I decide to separate business logic in the EJB but I also want to keep the performance and the userfriendliness of the original user interface, and I want to continue using Swing as the original user interface does.
    I've read about using Rowset and I need some opinions about this from you guys who already have some experience with it.
    Any suggestions would be greatly appreciated.
    Thanks
    Setya

  • Parsing field data into mailto:

    Is there any way to pull field data, like with a variable %TextField2%, so it can be used somewhere else in the form?  What I'm trying to setup is a form that will take the data from TextField2 so I can use it to prepopulate the subject of the mailto: submission.  This is the line I'm using:
    I have %TextField2% entered as an example.  So basically I just need the info from TextField2 to be used in the subject= line.  If anyone has any information on how to do this it would be greatly appreciated.  Thanks!

    Got it. Here is the script I used:
    event.target.submitForm({cURL:"mailto:[email protected]?subject="+TextField1.rawValue+"",cSub mitAs:"PDF",cCharset:"utf-8"});
    TextField1 is the field I referenced to. Hope this helps someone out.

  • How to control the data  in data selection

    Hi,
    how to control the data  .
    in the transfer structure I am having 10 fields and and the file which is to be loaded contains 7 fields only.where can I control  the other 3 fields and how .
    thanks in advance
    karna

    If your source file is flat file, add extra three fields with blank (just add field separator say comma for each extra field) and then load. It should be ok.
    Hope it helps..

  • Pulling/Extracting Data from Multiple SAP Systems - Scripting, ABAP?

    Hello All,
    I am working as an analyst for a large company that has multiple SAP installations across the world.  What I am trying to do is create some global reporting metrics based on data from all of those systems on an ad-hoc basis without having the other units send the data to a central repository.  I can receive access to all of the systems but I am unsure how to pull the data. The access to one of the systems I have currently does not allow the use of ABAP or RFC but does allow scripting.  If I have a good business case I could ask for ABAP access and RFC as well.
    I have researched and read through many posts and articles within the forums but I am yet to find a solution.  I have experience in VB, VBA, and MS Access.
    Can anyone suggest any ways to move forward? 
    Thanks!

    According to my understanding, you may use vba in your excel or a just vb by programming against rfcsdk(librfc32.dll) or the newly nwrfcsdk, or use jco or nco..., but all these method are based on rfc function call.
    You may write a simple abap side data extraction agent, just a function select some table with the data you interest, and then call this function from outside regularly, then you may save the returned table to a csv then bcp to sqlserver(c + batch), or just write to excel sheets(vba).
    The simple table read function you may check RFC_READ_TABLE, but it has some limits and are not released. The more functional agent is also can be found from other vendors, eg ms sqlserver2005 kit`s sap adapter...
    I do not have idoc or services experience, maybe in that senerio you will find a easier solution.Good luck, you may reach me at <b><REMOVED BY MODERATOR></b>
    Message was edited by:
            Alvaro Tejada Galindo

  • Pull the data from ORACLE

    Hi Guru's,
    I would like to know ,How to pull the Data from Oracle tables to BW.
    tell me scratch onwards...
    regards
    sekhar ch

    Hi...
    In the admin workbench open the modeling tab and select Source Systems
    In the right pane, right-click on Source Systems and select Create…
    A dialog requires you to define the type of source system. Select “Database System”
    Enter a description for the source system
    Once you accept the definition of the source system, you have to provide the following information, save and back out:
    DBMS: ORA (Oracle)
    User Name: Your UID
    DB password: Your pwd
    Conn. Info: sql*net string
    Select “Permanent connection” if this is the case
    If everything went well, you should see the new source system. When you do a right-click and ask for the DataSource overview, the first time you execute it you will be prompted to generate the application hierarchy
    In order to test connectivity, right-click on the source system and select “Select Database Tables”
    The following screen shows up. Click on the execute button…
    any tables or views that you have access through your UID
    Select a table or view and click on “Edit DataSource”
    To test data retrieval, click on “Display table contents”
    Designate the application component, determine the type of DataSource (Text, Master data, or Transaction data) then generate the DataSource
    with regards,
    hari

  • How to retrive the data from structure

    Hi Guru's,
                 I have an doubt in how to retrieve the data from the standard structure or view .i want to retrieve the data from std structure name is (IOOPCOMP) in that structure i want to fetch the field DENMNG ,MENGE,EINHEIT how do i write select query to  print the value . if any one can have any example structure related program give me its very helpful for me.
    with regards,
    sen

    Hello Senthil
    The solution for your problem is trivial. Checking the Where-Used-List for structure IOOPCOMP (on release 4.6c) there is neither a function module nor a class using this structure (or fields of it).
    However, the structure is used in the following list of programs:
    PPIO_ENTRY
    PPIOA000
    PPIOB000
    PPIOC000
    PPIOD000
    PPIOE000
    PPIOF000
    PPIOG000
    PPIOH000
    PPIOI000
    PPIOK000
    PPIOM000
    PPIOO000
    PPIOQ000
    PPIOR000
    PPIOS000
    PPIOT000
    PPIOW000
    PPKALKFI
    PPPIA000
    PPPID000
    PPPIG000
    PPPIH000
    PPPII000
    PPPIK000
    PPPIM000
    PPPIO000
    PPPIQ000
    PPPIR000
    PPPIT000
    PPPIW000
    RCCLORD
    SAPDBIOC
    SAPLCOWORK240
    SELECT_OPERATION
    If you know judging from your business context which program is the right one you are half-way on the home stretch.
    Regards
      Uwe

Maybe you are looking for

  • Displaying multiple messages in a single view

    Hi, I am trying to display two diffrent messages in same view. for this i am using two different message area UI elements. When I use the code wizard to generate the message,same message is being displayed in two message areas. But i do not want that

  • Ipod 80 gb classis no longer plays music, although everything appears to be working on my screen

    HI, my classic Ipod 80gb charges correctly and uploads files etc. However, it no longer outputs any sound, either by headphones or by the port via any type speaker. Presume something has 'broken' inside. Loath to throw it away, but would welcome any

  • Play count for imported items

    Here's a new one for me... Starting with this latest version, when I burn a CD, it automatically marks the Play Count for those items at 1. Anyone else encounter this? Is there a fix?

  • Lightroom 5.4 keeps logging me out of Lightroom mobile.

    I'm using Lightroom 5.4 with Lightroom mobile. Whenever I close Lightroom (on the desktop) and restart, I need to login to LR mobile again with my Adobe ID. Until a couple of days ago, the software remembered my login and kept me logged in. Is there

  • My entire itunes library has disappeared !!!

    Hi all , My entire library has disappeared !! Not sure if it happened during updates or one of my kids did it !! HELP ...... had over 2000 items in there !! Thanks