‎2008 Oct 23 8:34 AM
Hello everybody,
I would like to save an document component (data in interne Table on server). Do you know how can I do it ? Know any one a relevant BAPI?
Best regards
Bogdan
‎2008 Oct 27 5:34 PM
Hi Bogdan,
try this:
DATA: l_file(60) VALUE '/tmp/example.txt'.
*write table to file
OPEN DATASET l_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
LOOP AT itab.
TRANSFER itab TO l_file.
ENDLOOP.
CLOSE DATASET l_file.
*read file to table
DO.
READ DATASET l_file INTO itab.
IF sy-subrc NE 0.
EXIT.
ELSE.
APPEND itab.
ENDIF.
ENDDO.
That's basically it.
regards,
Edgar
‎2008 Oct 27 5:34 PM
Hi Bogdan,
try this:
DATA: l_file(60) VALUE '/tmp/example.txt'.
*write table to file
OPEN DATASET l_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
LOOP AT itab.
TRANSFER itab TO l_file.
ENDLOOP.
CLOSE DATASET l_file.
*read file to table
DO.
READ DATASET l_file INTO itab.
IF sy-subrc NE 0.
EXIT.
ELSE.
APPEND itab.
ENDIF.
ENDDO.
That's basically it.
regards,
Edgar
‎2008 Nov 03 7:20 AM
Hello Edgar,
well, this way it is possible to load e filke - I know it. I wolud like to save a Data from Table in KPRO as a Original's Componont.
Best Regards
Boguslaw
‎2008 Nov 04 8:32 AM
Sorry Bogdan,
I've miss understood you.
I've never worked with KPRO components, but I'm actually building a code to place a document stored in the DMS to place inside a smartform. I'll post it when finished, it might be helpfull.
I'm checking this functions: [http://help.sap.com/saphelp_nw04/helpdata/en/3c/4d26696ab411d3aece0000e82deb58/frameset.htm] and bapi's BAPI_DOCUMENT_*
You might be interested in this link, although it doesn't answer to your question: [https://www.sdn.sap.com/irj/sdn/wiki?path=/label/snippets/kpro]
best regards,
Edgar
‎2011 Jan 31 10:51 AM