SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

как получить название переменной



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
Crystal_Ra
Старший специалист
Старший специалист



Joined: 12 Mar 2008
Posts: 108
Location: Белгород

PostPosted: Fri Jun 19, 2009 12:03 pm    Post subject: как получить название переменной Reply with quote

Простенький казалось бы вопрос про runtime ....

как получить название переменной?

_________________
(SAP) Система нипель... выпускает лучше, чем впускает!

Crystal_Ra
Back to top
View user's profile Send private message
vga
Мастер
Мастер


Age: 85
Joined: 04 Oct 2007
Posts: 1218
Location: Санкт-Петербург

PostPosted: Fri Jun 19, 2009 2:08 pm    Post subject: Reply with quote

Ничего себе простенький Smile
Не зная имени переменной, как можно получить ее имя?
Можно узнать тип переменной, думаю можно получить список всех переменных в программе.
Уточните, что Вы хотите?
Back to top
View user's profile Send private message Blog Visit poster's website
Crystal_Ra
Старший специалист
Старший специалист



Joined: 12 Mar 2008
Posts: 108
Location: Белгород

PostPosted: Fri Jun 19, 2009 2:46 pm    Post subject: Reply with quote

пишу класс для работы с excel.
предположим объект PrinterSetup.
У него есть свойство( важное как я понимаю Smile ) Orientation.

Если я в своем ABAP объекте делаю его объявление так:

Code:

CLASS z_cl_PageSetup DEFINITION.
  PUBLIC SECTION.

    Data: f_noflush Type bool.
    Data: save_f_noflush Type bool.

    Data: Worksheet Type ole2_object.
    Data: PageSetup   Type ole2_object.

...
    Data: Orientation Type I Value  xlPortrait. "xlLandscape,
...

ENDCLASS.


то хотелось бы при присвоении

object->Orientation = xlLandscape.

что бы это отразилось на msexcel ...
В ABAP я что то затрудняюсь такое сделать...(может намекнете как сделать? если есть возможность ?)

Вот я и подумал, что можно было бы написать код, который свойство устанавливал по этой переменной!

то есть получал бы название переменной и вставлял в вызов OLE

Code:

  METHOD Set_Property.
         
         p_Prop = get_property_name( Variable ).

         If f_noflush is initial.
            set property of PrinterSetUp p_Prop = p_Value.
         Else.
            set property of PrinterSetUp p_Prop = p_Value no flush.
         EndIf. "
  ENDMETHOD.





Вот и вопрос как получить то это имя?
вот для этого зверя object->Orientation получить имя Orientation ?

_________________
(SAP) Система нипель... выпускает лучше, чем впускает!

Crystal_Ra
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.