Is this possible..at all..?
Here is my question..
In my program, I am using an internal table which is based on a custom table. the table has 50 fields and 20000 records. For every record, I need to check if any of the fields are initial and if so, populate them with a certain value. I am using a logic similar to the one listed below.
loop at itab into wa.
if wa-field1 is initial.
wa-field1 = '1'
endif.
if wa-field2 is initial.
wa-field1 = '2'
endif.
........" until field 50 and modify the table
endloop.
Now instead of hard coding each field, is there a way, I can refer to the fields dynamically... I am not sure, if I can use Field symbols..I am currently researching that..
Any iputs will be appreciated... Thanks.
Yes, you can ..you can refer the code below for your use.
data: lo_ddref TYPE REF TO cl_abap_datadescr,
lo_table TYPE REF TO cl_abap_tabledescr.
DATA : lo_struct TYPE REF TO cl_abap_structdescr,
lo_type TYPE REF TO cl_abap_typedescr.
DATA: lt_target_tab_struc TYPE dd_x031l_table,
ls_target_tab_struc TYPE x031l,
Find the table strcuture type
CALL METHOD cl_abap_tabledescr=>describe_by_data
EXPORTING
p_data = itab
RECEIVING
p_descr_ref = lo_type.
Cast it to generic type cl_abap_typedescr
lo_table ?= lo_type.
CALL METHOD lo_table->get_table_line_type
RECEIVING
p_descr_ref = lo_ddref.
Get the source table DDIC structure information
CALL METHOD lo_ddref->get_ddic_object
RECEIVING
p_object = lt_target_tab_struc
EXCEPTIONS
not_found = 1
no_ddic_type = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Read the first line of the table to find the
strcuture/table type name
READ TABLE lt_target_tab_struc INTO ls_target_tab_struc
INDEX 1.
Declare workareas dynamically based on the
structure of the tables eing passed.
DATA: dref1 TYPE REF TO data,
dref2 TYPE REF TO data.
CREATE DATA : dref2 TYPE (ls_target_tab_struc-tabname).
Assign the work areas to field symbols
ASSIGN:
dref2->* TO <wa_target>.
Loop at each record
LOOP AT itab INTO <wa_target>.
Loop at each field of the source work area
LOOP AT lt_target_tab_struc INTO ls_target_tab_struc
ASSIGN COMPONENT ls_target_tab_struc-fieldname
OF STRUCTURE <wa_target> TO <wa_target_fld>.
if <wa_target_fld> IS ASSIGNED and
<wa_target_fld> IS INITIAL.
sET THE VALUE
ENDIF.
ENDLOOP
ENDLOOP.
Similar Messages
-
i got a new laptop because my old one won't turn on anymore .i can only sync my account to 5 computers so how do i unsync the account from my old laptop if i can't use my old laptop ?and i have over 12000 songs that i now have to individually drag and drop onto my computer that doesn't hold that much space because none of my songs will play because there is no file on computer to back it up .all of my songs are saved in the cloud y isn't that enough to make my songs play ?so now i have a list of songs that won't play on my itunes that won't let me use my account because it's the 6th computer on my account .it's kindda pointless .
Tigon's already got you covered here. But I'll chime in with some English localisation advice.
There's a couple of ways to get through to the authorisation controls in the 11.0.x versions.
The control is still in the Store menu, but first (if you're using iTunes versions 11.0.x) you might need to bring up the menu bar to see the Store menu.
If you're using 11.0.x, click on the wee boxy icon up in the top-left corner of your iTunes to see the "Show Menu Bar" control, as per the following screenshot:
Then you'll find the control in the Store menu:
Alternatively, if you don't want to bring up the menu bar, it's still possible to get into the authorise controls via nested menus accessible from the wee boxy icon. Here's a screenshot of where to find them: -
Editable / draggable texfield..is this possible?
Hi,
I want to have a textfield that is editable and draggable
around the screen (it will sit over an image). Is this possible at
all? I've been looking around the Internet all day and haven't
found an answer, only something that gives me a draggable /
NON-editable textfield :(
this works for dragging but not for editing. Also not sure if
its best practice?
http://www.cflex.net/showFileDetails.cfm?ObjectID=617
Any help much appreciated!Hi
I have a done a editable pdf in pro.
My client needs to put different percentages into the form (different for everyone)
so 1 pupil might have 25% but next 60% which she wants to change herself and then send to the student.
I have set it up so she can save it but when she sends it to the pupil, she can fill in the form BUT she can also change the percentage which we do not want.
My client is using normal acrobat (free one) 6.5 and pupils will probably have just the free reader.
Thanks -
Unfortunately, I lost by an update all the apps on my iPad 2. Now I can not pull the data from the cloud to my iPad. How is this possible?
If you just installed iCloud does that mean you updated the iOS that's running on your iPad? If so, you'll want to restore all the programs you have from the backup you hopefully made.
Refer to these articles for help.
iTunes: Backing up, updating, and restoring iOS software.
If you don't want to use iCloud, simply don't activate it.
You can also download the programs again.
If you live in a country that supports re-downloading apps then you can re-download them. You can refer to this article for more help.
Downloading past purchases from the App Store and iTunes Store
What to know if your country supports downloading past purchases?
iTunes in the Cloud Availability -
I have two Itunes Accounts and I would like to merge all Apps to one Account. Is this possible ?
No. You can not.
-
I wish to transfer all the music on my ipod (synced with my home computer) to my itunes on my work computer. Is this possible? I am concerned if I plug my ipod into the work computer, which has itunes but no music content, that it will automatically sync and wipe all the content from ipod. Can anyone advise?
Only if you use a third-party utility such as Phone to PC and only if you use the same Apple ID for your other computer.
-
when i send a text message with my new iphone 5 to my wife who is now using my old Iphone 4 we both receive the message. How is this possible? Also she receives all text messages sent to me. She obviously has a different phone number and a different provider
See here to create a new apple ID
http://support.apple.com/kb/HE37
good luck -
A mate has an iphone 4 as a work phone, now he is leaving and needs to get all data incl messages etc onto an old iphone 3. Is this possible, any help appreciated.
RobbieYou won't be able to restore a device running iOS 4.2 from a backup of a device running iOS 5 (as you found out). And the Iphone 3G can only be updated to iOS 4.2.1 so there is no way to migrate from his iPhone 4 back to his iPhone 3G. He would have to at least have an iPhone 3GS, which will update to iOS 5.1 and would be able to restore from the iPhone 4 backup. Unfortunately, there isn't any way around it.
-
I have to extract all files from a hard drive of a macbook pro that is no longer working. All I have to access the hard drive is a PC, is this possible, and if so how?
You could try Paragon HFS+ for Windows. That would allow you to read and write files from a Mac-formatted drive.
Clinton -
i need to connect my Imac 27'' (newest version) up to 3/4 monitors (all 40'' LCD tv's with VGA and HDMI connections) with extended display to all external screens, not duplicate images. Is this possible?
I would suggest you visit an Apple dealer, preferably an Apple Store if there's one in your city, and ask for assistance in determining what you need. The questions and issues you bring up are rather complex to address in a technical support forum and would be better addressed in person where you and the salesperson can ask questions back and forth to arrive at the optimal setup.
Regards. -
I'm a iPhone 4s and new iPad 3 owner. I'd like the apps and organization time I've invested in the iphone to be exactly transfered to the ipad. Is this possible? Will all the applications and folders match exactly? Thank you for your help
Restore the latest iPhone backup you made to the iPad.
-
Hello all,
I have a iMac, iPhone 4s, iPhone 4 and an Apple TV v3...and I would like to be able to stream the same song to all of these devices all at the same time. Is this possible do you know?
any details greatly Rx'dWelcome to the Apple Community.
Thats not possible I'm afraid, only the Apple TV can receive an AirPlay stream, and even then only one at a time, unless you stream from a computer. -
my friend has an iphone 4 and believes her messages on her phone have been hacked as and ex boyfriend has contacted her telling her who she has spoken to and read the message she has for the past week, is this possible and how can she stop this?
ThanksYou're welcome.
Ask her if they shared an Apple ID to download iTunes Store content such as apps and music?
If not, he knows the password for her Apple ID email address.
She can create a new Apple ID with this link.
https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/wa/createAppleIdForIK B?localang=en_US&path=
She needs to create a new email address first as well.
Tell her not to use any security questions that her ex knows or may know.
After she has created a new Apple ID, on her iPhone go to Settings > Messages > Send & Receive > Apple ID.
Select the Apple ID and at the menu window that appears, select Sign Out.
She signs back in at the same location with her new Apple ID to register her iPhone phone number with her new Apple ID and this will prevent her ex from having access to all iMessages that she sends and receives. -
I have a new macbook air, and want to transfer all my data using time machine from my old macbook running leopard, is this possible and easy and will it transfer all my musc and photos?
The Setup Assistant can restore your data from a Time Machine backup. You'll be asked if you want to do this the first time you turn the computer on.
(60797) -
Hello All, yesterday afternoon I just lost all recent updates to my iCal from the last days. How can this possibly happen ??? It may have occured after I chose the Refresh function after I had problems searching my iCal for a particular event. I think my iPhone was also not properly synched in the morning but I didn't pay it much attention and opened iCal on my MacBookAir instead.
How can I prevent this from happening again?
What can I do to restore iCal with the most recent updates?Random glitch. It doesn't matter; if you didn't backup the data, then you can't recover the data.
In the future, for any 'important' data, back up that data regularly. Forward the 'important' text messages to your email. Trasnfer your photos & videos to your computer, etcetera. -
My child received a $50 voucher for Xmas but doesn't want to use it all at once. I'd like to remove the voucher code so I can purchase items from iTunes using my usual account. Is this possible?
Hi czigrand,
Thanks for visiting Apple Support Communities.
Currently, you can gift dollar amounts or individual items (EG. songs) on the iTunes Store. See this article for more information:
In the iTunes Store, you can gift a dollar amount or specific music, movies, TV shows, or apps from your iPhone, iPod touch, iPad, Mac, or PC. Follow these steps to send a gift from the iTunes Store.
iTunes: Sending iTunes Gifts
http://support.apple.com/kb/HT2736
Best Regards,
Jeremy
Maybe you are looking for
-
I just updated my iPhone to the new OS. And it deleted a couple of my most-used apps, namely Twitter and Things. They are no longer on the phone or iTunes. And yes...I've searched for them. they are not on other screens. They are GONE. Help! I don't
-
A bizarre ORA-13349 case in 9i
Hi all, We have just migrated from 8.17 to 9.2 and encountered a rather strange validation error on a particular polygon geometry. Subject Geometry: Parcel polygon composed of 4 polylines and 3 arcs. Validation SQL: SELECT SDO_GEOM.VALIDATE_GEOMETRY(
-
Hi! I am using WebAS 6.40 using.The ABAP stack is working fine.But when I am unable to connect to the web console.when I give the url for the webConsole http://<ser-name>:port-no/me it is displaying as no page found error.. When I tried to log
-
Upgrading to Weblogic 9.2
Hi I'm upgrading an 8.1 app to 9.2. I've managed to deploy it, but when I try to access a web service I have deployed there it returns a 401 error, because it's trying to do basic authentication. It worked fine under 8.1. I tried adding <enforce-vali
-
Hello , I have an old version of Cubase VST [4.1],and I would like to use it with my G4 ,just to have fun. Because this software has a protection system with a floppy disk ,I need to use a floppy disk drive with my G4, to authorise my hard disk for u