How can i point to a specific field in DEEP structure and populate it?

Hello,
I have declared a internal table as below,
DATA: BEGIN OF wa_data,
              vkorg TYPE vkorg
              vtweg TYPE vtweg
              spartTYPE spart
              field_name TYPE CHAR30
               value TYPE CHAR50
            END OF wa_data
DATA: ls_data TYPE wa_data,
            lt_data TYPE STANDARD TABLE OF wa_data.
The lt_data is populated as below,
VKORG-------VTWEG-------SPART-------FIELD_NAME-------VALUE
1000-----------10-------------01------------KALKS---------------ZP00 "Pricing procedure
1000-----------10-------------01------------ZTERM---------------15 days "Payment terms
1000-----------10-------------01------------MAHNA---------------09 "Dunning
Fine.
Now, i have a DEEP DEEP DEEP structure as belowm
DATA: ls_deep TYPE cmds_ei_extern. "Pls. see this deep structure 'cmds_ei_extern' in SAP DDIC / SE11
This deep structure is part of Customer master creation. Now, i would like to POPULATE this deep structure from my lt_data itab DYNAMICALLy, i mean, with out mentioning the field names (like, ZTERM, KALKS, MAHNA etc etc), bcz its these i am pulling this lt_data from a custom table, so going further business may also ADD a new record / field like BUSAB (Accouting clerk) with a value of AL (Allen Christi), hence i want to hv dynamic and its less tediuos also bcz,
We can LOOP lt_data INTO ls_data (for example, the ls_data-field_name = KALKS)
Now, point the KALKS in the deep deep deep structure and populate it with a value of ls_data-value (= 15 days)
ENDLLOOP.
Pls. let me know How can i do this, i guess, we need to use field symbols, pls. let me know the code to achieve my requirement
Thank you

Hi,
Please refer below code.This will populate field kunnr of the deep structure. Once you select the data as per your requirement,you can write similar code to populate rest of the fields in the deep strucure.
TYPES : BEGIN OF ty_data,
             kunnr TYPE kunnr,
             END OF ty_data.
FIELD-SYMBOLS : <lfs_cmds_ei_header>   TYPE cmds_ei_header,
                <lfs_cmds_ei_instance>              TYPE cmds_ei_instance,
                <lfs_kunnr>                                   TYPE kunnr.
DATA:  lfs_cmds_ei_extern  TYPE cmds_ei_extern,
             lr_dytable                  TYPE REF TO data,
             lr_dytable_wa           TYPE REF TO data,
             lt_data                       TYPE STANDARD TABLE of ty_data ,
             wa_data                   TYPE ty_data.
  SELECT kunnr
  FROM yalb_kunde
  UP TO 1 ROWS
  INTO TABLE lt_data.
  IF sy-subrc = 0.
    LOOP AT lt_data INTO lwa_data.
      ASSIGN COMPONENT 'HEADER' OF STRUCTURE lfs_cmds_ei_extern TO <lfs_cmds_ei_header>.
      IF sy-subrc = 0.
        ASSIGN COMPONENT 'OBJECT_INSTANCE' OF STRUCTURE <lfs_cmds_ei_header> TO <lfs_cmds_ei_instance>.
        IF sy-subrc = 0.
          ASSIGN COMPONENT 'KUNNR' OF STRUCTURE <lfs_cmds_ei_instance> TO <lfs_kunnr>.
          IF sy-subrc = 0.
            <lfs_kunnr> = lwa_data-kunnr.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDLOOP.
  ENDIF.
Thanks,
Priya

Similar Messages

  • How can i open period for specific user in OB52.

    Hi Expert,
    How can i open period for specific user in OB52.  As 'Authorisation Group' field is there in OB52, how can i use this field to restrict the specific user to post for particular period.  How can i creat authorisation group and where can i assign it to the particular user...
    Please let me know?
    Thanks and regards,
    Sam.

    Hi,
    Here is the detailed process as outlined in SAP help.
    Procedure
    If only a limited set of users is to be able to post in a particular posting period, proceed as follows:
    Add the posting period authorization (authorization object F_BKPF_BUP) to the authorizations of the selected users. Assign an authorization group (e.g. '0001').
    Enter the account type '+' for the posting period variant to which the restriction is to apply. Enter the period(s) whose use is to be restricted in the first period, those which are available to all users in the second period, and the authorization group (e.g. '0001') in the last column.
    Examples
    A posting period can be successively restricted. If, e.g. 10 users have the posting period authorization with authorization group '0001', and 3 of these 10 users also with authorization group '0002'.
    If the period is only to be accessible to the 10 selected users the authorization group '0001' is entered in the posting period variant. Access can later be restricted to the remaining 3 users by entering '0002'.
    Thanks
    Venkata Ganesh Perumalla

  • How can I setup a mail-specific passcode/restriction on iPad used by multiple family members?

    How can I setup a mail-specific passcode/restriction on iPad used by multiple family members?
    Have an Exchange mail account setup and accessible in my mail on iPad... however my kids use it and i would like to restrict them from accessing this specific portion of the device.  I tried viewing restriction options and do not see that i can apply a restriction specifically to Mail.  Thanks for your help.

    Not a feature of iOS. Check the AppStore to see if there are other
    mail apps that allow passcode protection.
    Or use Safari to log onto your email via a web-based interface and
    enter your credentials each time. A bit slower, but the kids will
    not know the details to login.

  • How can I share a project specific calendar I created on Entourage 2008 ?

    How can I share a project specific calendar I created on Entourage 2008 without showing my personal calendar? I created a project specific calendar using Entourage 2008 for Mac. I want to add someone that uses Outlook from a PC. We are in the same exchange network.  I have added this person in under the sharing tab, but don't see a way to invite her to view it, and it does not appear on her Outlook list of shared calendars. I was able to invite her to view my main calendar, but not the project specific one. Any suggestions?

    http://www.microsoft.com/mac/support

  • How can I create a Text-Input Field in BexAnalyzer for a Planning Function

    Hello,
    i want to create a pre calculation(contribution accounting) for Materials in BI-Integrated Planning. These Materials aren't in the master data. So I create a new Info Object for pre calculated materials with only a material-number as key and a text-description.
    Now I want to write a Exit-Function, which creates new materials in these Info Object. The user should start this function in a planning application in BexAnalyzer. There the user should have the possibility to enter a text-description for the new material. How can I create such a Text-Field in BexAnalyzer and how can I read this text filed in a planning function (exit).
    Thanks in advance

    Hi Jürgen,
    you can create a parameter for this in the exit function and a variable for the parameter. In BEx Analyzer then create a button for the planning function; in the button parameterization use VAR_NAME = , i.e. use an Excel formula here to get the value from an Excel input field.
    The command range should be some 'hidden area' in your Excel sheet.
    But may be you don't need this. Use a characteristic without master data. Then ensure that that the query uses the option 'key' as display. In new lines you can then enter the key, the system creates a SID on the fly (but the text table will not be updated). In this scenario you may take text also from the key. May be you can update the text table (online or in batch) by simply using function modules from function group RSNDI_MD (not released by SAP).
    But observere that the system in BI Planning reads only the active version, i.e. if you change something on the fly the changes may not be visible.
    Regards,
    Gregor

  • How can i do to add a field in TAB BIDDER

    Hi expert,
    Does anyone know how can i do to add a field in TAB BIDDER. I am working on SRM 7.0 in RFX-Bid invitation. In Spro does not exist a structure to do that. 
    I think that i can do that with webdynpro, but i do not the way.
    I do not have problem to add fields in header or item in rfx. By the way my real problem is add field in TAB BIDDER.
    Could anybody help me, please?
    Thanks in advance.
    Manuel

    Thanks G.Ganesh, but i did not receive the document because my job´s mail does not allow receive this kind of message. Therefore i change the  business card with my personal mail.
    Please, can you send the document again?
    Thanks a lot, and i apologize by this situation.
    Manuel Juez
    Edited by: Manuel Juez on Nov 3, 2009 2:47 PM

  • How can I point the premiere to a blank folder and bring only the files needed for the project

    When I start premiere it loads all files from all my photo/video libraries (app 150 gb almost 20,000 photo).  I do not want to sort thru all these files for a project.  How can I point premiere Elements to a blank folder and get the appropriate media for a project as I
    need them.

    As Steve points out, there are really three programs in the Premiere and Photoshop Elements "suite," PrE, PSE and then Organizer, which links between the two, and is an Asset cataloging program. Because of the commonality of the GUI (Graphic User Interface), there can be confusion as to exactly which program one is in.
    If you launch just PrE, and not Organizer (can be launched from within either PrE, or PSE), the only Assets/media that you will see is that, which you have Imported into your Project.
    Also, having the Assets for a Project, in a separate folder, or folder structure, is a great way to set up the Project. This article goes into details on one set up method: http://forums.adobe.com/message/4491450#4491450
    Good luck, and hope that helps,
    Hunt

  • How can i open up Profit center field in F-32?

    Sometimes we write-off (with F-32) some amount on the payment to account that require profit center assignment. How can i open up "Profit Center" field on the transaction? as of now it is now showing up.
    Thanks!

    Hi
    Please Goto--> T.code: F-32
    Enter required parameters and click on process open items.
    then click on back out button(green arrow). you need to enter the posting key and GL account and press enter button.
    Enter required parameters and the profit center visible to you. If not click on additional data tab.
    Regards
    Odaiah

  • How can I check to support specific JSRs using standard API?

    Hi all.
    How can I check to support specific JSRs?
    I'd like to know supporting of following JSRs on VM.
    1. JSR-75 (FileSystem and PIM API)
    2. JSR-120 (WMA)
    3. JSR-135 (MMAPI)
    4. JSR-211 (CHAPI)
    5. JSR-184 (M3G)
    and so on...
    Thanks.
    Message was edited by:
    WhiteBear

    Answer myself.
    It was possible using System.getProperty().
    In case of supporting a FileConnection,
    Return value of System.getProperty("microedition.io.file.FileConnection.version")
    should be "v1.0" or similar value.
    Thanks.

  • How can i add addtional user defiend fields in infoset

    Hi,
    Can any one tell me how can i add addtional user defiend fields in infoset and make it availible in output screen.
    Also please tell me to create parameters through abap quary sq02 , as by default it creates select-option.
    With Thanks n Regards,
    Ranu

    Hi,
    As I said before it is not that straight forward.If you will decompile tcViewProfileAction .class using any java decompiler you will find out that data in setAccountProfile method is not getting set through formmetadata.xml . If you are well verse with struts then only you can achieve what you are trying to do.You need to extend tcViewProfileAction class and also tcViewProfileForm class and then you need to modify tjspViewProfileTiles.jsp .It will not be easy job.Usually in implementation we do not change action class until its absolutely required as oracle also do not recommend that so now its between you and your client to make a call if they want to go for such customization.I won't recommend you do that.
    Regards
    Nitesh

  • How can i find screen group system field?

    Hi all,
    How can i find screen group system field?
    Thanks,
    Nidhi Kothiyal

    Hi,
    Do you mean by the screen-group which we give for the fields to be active or inactive in module pool?
    You can find it in the attributes window which comes by double clicking on the field. In that give the group name in the 1st box in GROUPS.
    Thanks,
    Sri.

  • How can I print on a Document that I have Scanned and is on my computer and then print it.

    How can I print on a Document that I have Scanned and is on my computer and then print it.

    And what exactly? How did you scan? What "document"? What system? You need to be a lot more specific, especially since it is absolutely not clear what Adobe software has to do with it.
    Mylenium

  • Mountain Lion Recovery DVD - How can I make one, ML was installed on my iMac and BBP

    Mountain Lion Recovery DVD - How can I make one, ML was installed on my iMac and MBP when I purchased them. When I look at the App Store, it dose not show ML as purchased (to download again) - do I have to purchase it again to make a Recovery DVD?
    Thanks for your help.
    Regards
    NGI

    do i have to purchase it again to make a Recovery DVD?
    No. You can still make a bootable recovery DVD, but you will not be able to make a full bootable copy of ML without purchase.
    1) Enable the debug menu for Disk Utility via Terminal Application. Navigate to terminal by typing "terminal" in   spotlight. Copy the bolded text below and enter it into the command prompt:
    defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true ; open -a "Disk Utility" ; exit
    2) From the Debug Menu > Select Show every Partition > Recovery HD should appear
    3) Right click (control + click) the Recovery HD partition and select "Mount"
    4) Right click again the partition again > "Reveal Recovery HD in Finder". Leave this window open
    5) At this point, you will need open terminal again and enter the following command:
    sudo chflags nohidden /Volumes/Recovery\ HD/com.apple.recovery.boot/BaseSystem.dmg ; exit
         Type your password when prompted.
    6) Navigate back to the Recovery HD finder Window > com.apple.recovery.boot > BaseSystem.dmg
    7) Drag "BaseSystem.dmg" into Disk Utility's sidebar.
    8) Insert your DVD
    9) Select "BaseSystem.dmg" in the sidebar and hit "Burn"
    Once the burn is completed, hold option down at startup and select the DVD to boot. This is a bootable Recovery partition, not a bootable copy of ML.
    Note: to disable the debug menu,
    defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool false

  • How can I select several emails from 3900 on my 5c and delete the rest easily

         How can I select several emails from 3900 on my 5c and delete the rest easily

    We'll I don't think there's a easy way to delete a lot of emails besides deleting all of them. To delete all of them click on inbox them edit then "mark all" then trash/delete. Other than that you will have to specifically deleted the ones you want to delete.

  • How can set screen resolution on firefox , i know zoom in and out but i want set my broswer to my favorie levelof zoom

    hi
    how can set my firefox screen resolution ( i know zom in and zom out but when i restart my firefox , it chanaged to perviose level of zoom )

    In case you are using "Clear history when Firefox closes":
    *do not clear the Site Preferences
    *Tools > Options > Privacy > Firefox will: "Use custom settings for history": [X] "Clear history when Firefox closes" > Settings
    *https://support.mozilla.org/kb/Clear+Recent+History
    Note that clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, and passwords and website specific setting like the page zoom.
    Clearing cookies will remove all specified (selected) cookies including cookies with an allow exception.

Maybe you are looking for

  • MM PO - New Pricing Routine / user exit / at Line item

    Hi When ever a line item data gets chnaged, we need to do the Update Pricing / New pricing Automatically. Currently we are doing this manually and would prefer to automate - request for possible suggestions / solutions OSS notes for this functionalit

  • 8.1.7 Installer load failure

    - Server name - Filename : Win817Client.zip - Date: 2/25/02 11:45 - Broswer: Internet Explore (5) - OS: Win 2000 - none AutoRun window pops-up, but when I click on the install/deinstall button, hour glass shows momentarily but never get LOADING splas

  • Emailing a video file from tour to an email address

    I am not able to send a video file from my BB tour 9630 to my email address. I have searched and searched for the option to do that but only found that it will send to a bluetooth device. I am not sure if my BB is configured correctly to send a video

  • Can a Apple Studio Display be used with a none Mac PC under Windows

    Hello, can a 21 Inch Apple Mac Studio Display Monitor (Graphite) be used with a none Mac PC under Windows. Thanks Peter

  • SMS being automatically deleted!

    All sms text messages are being automatically deleted from my Pearl within minutes of reading received messages and sent messages, how can I stop this? Solved! Go to Solution.