Ver Mensaje Individual
  #2  
Viejo 01/08/08, 14:42:35
sconoredhot sconoredhot is offline
Senior Member
 
Fecha de Ingreso: feb 2008
Localización: Argentina, Rosario
Mensajes: 341
Hola, este es un ejemplo.

*&--------------------------------------------------------------------*
*& Form open_dataset
*&--------------------------------------------------------------------*
* text
*---------------------------------------------------------------------*
FORM open_dataset.

OPEN DATASET p_arch
FOR OUTPUT IN TEXT MODE
ENCODING DEFAULT.

IF sy-subrc IS NOT INITIAL.
MESSAGE e002(ypap_cust_prog). "Error creation failed.
ENDIF.

ENDFORM. "open_dataset

*&--------------------------------------------------------------------*
*& Form transfer_dataset
*&--------------------------------------------------------------------*
* text
*---------------------------------------------------------------------*
FORM transfer_dataset.

LOOP AT it_archivo INTO wa_archivo.
TRANSFER wa_archivo TO p_arch.
IF sy-subrc NE 0.
EXIT.
ELSE.
CONTINUE.
ENDIF.
ENDLOOP.

ENDFORM. "transfer_dataset

*&--------------------------------------------------------------------*
*& Form close_dataset
*&--------------------------------------------------------------------*
* text
*---------------------------------------------------------------------*
FORM close_dataset.

CLOSE DATASET p_arch.
IF sy-subrc NE 0.
MESSAGE e002(ypap_cust_prog). "Error creation failed.
ELSE.
MESSAGE s003(ypap_cust_prog). "File created correctly.
ENDIF.

ENDFORM. "close_dataset
p_arch:
'E:\interfaces\Outbound\ ii156_SAPR3R0_ AFSPRT _VMD\com'
The name of the file is VENDORS

el cliente te tiene que decir donde quiere guardar ese archivo.

espero que te sirva...
__________________
Sebas

Desarrollador ABAP.
Responder Con Cita