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

base64 encoding



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



Joined: 21 Sep 2007
Posts: 55
Location: Киев

PostPosted: Wed Nov 19, 2008 12:41 pm    Post subject: base64 encoding Reply with quote

Добрый день, коллеги!
У меня вопрос к знающим, по примеру
http://sapnet.ru/viewtopic.php?t=79&highlight=base64
возможно сделать не декодировку, а кодировку массива данных в base64?

_________________
Приятно когда программа из стадии "Блин, она не компилится!" переходит в стадию "Блин, она не работает!"
Back to top
View user's profile Send private message
John Doe
Модератор
Модератор


Age: 45
Joined: 05 Nov 2007
Posts: 725
Location: КраснАдар

PostPosted: Wed Nov 19, 2008 1:29 pm    Post subject: Reply with quote

Вот такой пример:
Code:
PARAMETERS: TO64 RADIOBUTTON GROUP TYPE,
            FROM64 RADIOBUTTON GROUP TYPE.

DATA: BASE64 TYPE STRING VALUE 'VGVzdCBieSBKb2huIERvZQ==',
      PLAINT TYPE STRING VALUE 'Test by John Doe'.
DATA: UTILITY TYPE REF TO CL_HTTP_UTILITY.
DATA: OUTPUT TYPE STRING.

START-OF-SELECTION.
  CREATE OBJECT UTILITY.
  IF TO64 IS INITIAL.
    CALL METHOD UTILITY->DECODE_BASE64
      EXPORTING
        ENCODED = BASE64
      RECEIVING
        DECODED = OUTPUT.
  ELSE.
    CALL METHOD UTILITY->ENCODE_BASE64
      EXPORTING
        UNENCODED = PLAINT
      RECEIVING
        ENCODED   = OUTPUT.
  ENDIF.

  WRITE OUTPUT.
Back to top
View user's profile Send private message Blog
rudeman
Специалист
Специалист



Joined: 21 Sep 2007
Posts: 55
Location: Киев

PostPosted: Thu Nov 20, 2008 3:47 pm    Post subject: Reply with quote

Так намного проще ))
Спасибо огромное, John Doe Razz

_________________
Приятно когда программа из стадии "Блин, она не компилится!" переходит в стадию "Блин, она не работает!"
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.