ABAP Web Dynpro File Upload Sample

  DATA:

    elem_context TYPE REF TO if_wd_context_element,

    stru_context TYPE wd_this->element_context ,

    lv_cont type xstring.

 
 

* get element via lead selection

  elem_context = wd_context->get_element(  ).

 
 

* get single attribute

  elem_context->get_attribute(

    EXPORTING

      name =  `V_FILECONT`

    IMPORTING

      value = lv_cont ).

 
 

* Write file

  open dataset ‘d:\usr\sap\baymak.txt’ for output in binary mode.

  transfer lv_Cont to ‘d:\usr\sap\baymak.txt’.

  close dataset ‘d:\usr\sap\baymak.txt’.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s