Quantcast
Channel: SCN: Message List - ABAP Development
Viewing all 10425 articles
Browse latest View live

Re: Spool via mail: How to change mail subject and body text

$
0
0

hello,

 

how are you generating the adobe form outputs? There must be form and a driver program right ?

 

best regards,

swanand


Re: How to compare ABAP Structures and display differences

$
0
0

Hi Santanu,

 

thanks for finding this discussion.

But this Topic is for normal structures, which are not deep. This doesn´t solve my Problem...

 

Regards,

Damir

Re: Convert to xml from string / itab / table

$
0
0

hello,

 

For itab to xml

 

Pls check reports BCCXML. You can use some classes like CL_XML_DOCUMENT and CLMINI*XML for your your requirements.

 

best regards,

swanand

Re: tabstrip fields and radio buttons

$
0
0

hello,

 

Instead of using the field names, make a group of the fields. i.e assign the group property of the fields. This way handling that set of fields becomes easy.

 

Also you need to code on enter event in PAI. Check your sy-ucomm for enter command and copy similar code in PAI where you handle the command button processing.

 

 

best regards,

swanand

Re: mail from SAP going out as *.eml messages...

Re: Encrypt a text file using certificates

Re: Convert to xml from string / itab / table

Re: Convert to xml from string / itab / table

$
0
0

search for stylesheet transformations. start with something like

 

CALL TRANSFORMATION trafo_name SOURCE root = l_root RESULT XML l_xml.

 

hope it helps and kind regards,

anton


Re: How to merge multiple spools into single PDF file?

$
0
0

The following report, takes already existing pdf spools, and creates a new one with consolidated pdfs in a single spool.



REPORT  zovg_single_spool4.


TYPES:
   BEGIN OF ty_tsp01,
     rqident TYPE tsp01-rqident,
     rqtitle TYPE tsp01-rqtitle,
     rqdest  TYPE tsp01-rqdest,
     ban     TYPE c,
   END OF ty_tsp01.

CONSTANTS: l_c_printer(8) TYPE c VALUE 'LP0K',
            l_c_doctype(4) TYPE c VALUE 'ADSP',
            l_c_sptd       TYPE c VALUE '/'.

DATA:
   l_i_old_spools TYPE TABLE OF ty_tsp01,
   l_wa_old_spool TYPE ty_tsp01,
   g_v_pdf1             TYPE fpcontent,
   l_v_data      TYPE fpcontent,
   l_v_prdest    TYPE tsp01-rqdest,
   l_v_handle TYPE  sy-tabix,
   l_v_spoolid TYPE tsp01-rqident,
   l_v_globaldir TYPE text1024,
   l_v_pages     TYPE i,
   l_v_dstfile   TYPE text1024,
   l_v_filesize  TYPE i,
   l_v_partname  TYPE adspart
   .

   data: file_list like adsfile occurs 100.
   data: file like adsfile.
   data: content type xstring.
   data: partfilename type rlgrap-filename.
   data: l_v_ext(3)   type c.


  l_v_prdest = l_c_printer.


l_wa_old_spool-rqident = 11485.
APPEND l_wa_old_spool
   TO l_i_old_spools.
l_wa_old_spool-rqident = 11486.
APPEND l_wa_old_spool
   TO l_i_old_spools.


LOOP AT l_i_old_spools
   INTO l_wa_old_spool.


   IF l_v_spoolid IS INITIAL.

* Create a new spool order for the PDF'S
     CALL FUNCTION 'ADS_SR_OPEN'
       EXPORTING
         dest             = l_v_prdest
         append           = ' '"append
         doctype          = l_c_doctype
         titleline        = 'Title line Test'
       IMPORTING
         handle           = l_v_handle
         spoolid          = l_v_spoolid
         partname         = l_v_partname
       EXCEPTIONS
         device_missing   = 1
         no_such_device   = 2
         operation_failed = 3
         wrong_doctype    = 4
         wrong_devicetype = 5
         OTHERS           = 6.


   ELSE.

     CALL FUNCTION 'ADS_SR_OPEN'
       EXPORTING
         dest             = l_v_prdest
         append           = 'X'
         doctype          = l_c_doctype
         usespoolid       = l_v_spoolid
       IMPORTING
         handle           = l_v_handle
         spoolid          = l_v_spoolid
         partname         = l_v_partname
       EXCEPTIONS
         device_missing   = 1
         no_such_device   = 2
         operation_failed = 3
         wrong_doctype    = 4
         wrong_devicetype = 5
         OTHERS           = 6.

   ENDIF.


   CALL FUNCTION 'ADS_GET_PATH'
     IMPORTING
       ads_path = l_v_globaldir.


   CALL FUNCTION 'FPCOMP_CREATE_PDF_FROM_SPOOL'
     EXPORTING
       i_spoolid               = l_wa_old_spool-rqident
       i_partnum               = 1
    IMPORTING
      E_PDF                   = g_v_pdf1
      E_RENDERPAGECOUNT       = l_v_pages
*     E_PDF_FILE              =
    EXCEPTIONS
      ADS_ERROR               = 1
      USAGE_ERROR             = 2
      SYSTEM_ERROR            = 3
      INTERNAL_ERROR          = 4
      OTHERS                  = 5
             .

   l_v_data = g_v_pdf1.

*get list of part files

   refresh file_list.

   clear: file_list.

   call function 'ADS_SR_READ_CONTENT_DIR'
     exporting
       RQIDENT              = l_wa_old_spool-rqident
     tables
       FILE_LIST            = file_list
     exceptions
       WRONG_DOCTYPE        = 1
       INTERNAL_ERROR       = 2
       NO_DIRECTORY         = 3
       others         = 4.


*save every part file

   LOOP AT file_list
     into file.

     partfilename = file-name.

     CALL FUNCTION 'TRINT_FILE_GET_EXTENSION'
       EXPORTING
         filename        = partfilename
*       UPPERCASE       = 'X'
      IMPORTING
        EXTENSION       = l_v_ext
               .


     call function 'ADS_SR_READ_CONTENT'
       exporting
         RQIDENT                           = l_wa_old_spool-rqident
         PARTFILENAME                      = partfilename
       importing
         CONTENT_BIN                       = content
       exceptions
         CANNOT_OPEN_FILE                  = 1
         OPEN_DATASET_NO_AUTHORITY         = 2
         OPEN_DATASET_TOO_MANY_FILES       = 3
         OPEN_DATASET_INTERNAL_ERROR       = 4
         WRONG_DOCTYPE                     = 5
         others                      = 6.

     clear l_v_dstfile.

*  * Route to save part file
     CONCATENATE l_v_globaldir
                 l_c_sptd
                 l_v_partname
                 '.'
                 l_v_ext
            INTO l_v_dstfile.

     OPEN DATASET l_v_dstfile
       FOR OUTPUT IN BINARY MODE.

     TRANSFER content
           TO l_v_dstfile.

     CLOSE DATASET l_v_dstfile.

   ENDLOOP.


   l_v_filesize = xstrlen( l_v_data ).

*confirm partfiles.

*"Add old spool content to new spool
   CALL FUNCTION 'ADS_SR_CONFIRM'
     EXPORTING
       handle           = l_v_handle
       partname         = l_v_partname
       size             = l_v_filesize
       pages            = l_v_pages
       no_pdf           = ' '
     EXCEPTIONS
       handle_not_valid = 1
       operation_failed = 2
       OTHERS           = 3.


* Close the new spool order
   CALL FUNCTION 'ADS_SR_CLOSE'
     EXPORTING
       handle           = l_v_handle
     EXCEPTIONS
       handle_not_valid = 1
       operation_failed = 2
       OTHERS           = 3.

ENDLOOP.

Re: Spool via mail: How to change mail subject and body text

$
0
0

I Swanand,

yes it's right, the custom adobe form is generated by a custom program using a print device type "M".

I know that one possible solution is using the FM "SO_NEW_DOCUMENT_ATT_SEND_API1", but the requested analisys is using the print device solution.

 

thanks and best regards

Federico

Re: ABAP Program not calling RFC in Background destination mode

$
0
0

Hi,

 

Do you have the Remote function module ZBAPI_EMPINFO_DELTA in ECC 6.0 and also the program that calls this function module in ECC 6.0?

 

Cheers,

Arindam

Re: Print Binary data (PDF file converted to binary data)

$
0
0

Hi Swanand,

 

Can you provide teh parameters you are passing to the FM. Am trying to check it in the system, but as the target is very close, it would be helpful if can provide me the parameters for these FMs if you have already used.

 

Thanks in advance,

Raksha

Re: BAPI for Transaction IL02

$
0
0

FUNC_LOCATION_UPDATE did not end up working for me -

Instead I used - CALL FUNCTION 'IFLO_UPDATE'

 

   DATA update(1) VALUE 'U'.

   DATA: iflo_new  LIKE iflo,
        iflo_old LIKE iflo,
        riupd_new LIKE riupd,
        riupd_old LIKE riupd.

 

    CALL FUNCTION 'FUNC_LOCATION_READ'
        EXPORTING
          tplnr   = functional_location
        IMPORTING
          iflo_wa = iflo_old.

 

   MOVE-CORRESPONDING iflo_old TO iflo_new.

 

   SELECT SINGLE adrnr FROM iflo INTO iflo_new-adrnr WHERE tplnr = functional_location.

 

   MOVE:
            functional_location TO iflo_new-tplnr,
            update TO riupd_old-indupd,
            update TO riupd_new-indupd1.

 

   CALL FUNCTION 'IFLO_UPDATE'
        EXPORTING
          iflo_new  = iflo_new
          iflo_old  = iflo_old
          riupd_new = riupd_new
          riupd_old = riupd_old.

 

 

Re: CDHDR and CDPOS; using Z***_WRITE_DOCUMENT , abort with CD 328: DUPREC

$
0
0

Hi Marcel,

 

Were you able to fix the issue.Please share the details.

 

harish.

Re: Runtime Error during table variant run as batch job.

$
0
0

Thanks to all for your valuable inputs !!!

 

To create a query rather than table variant run in the batch job seems as a good option and we are planing to go with it.

 

Thanks Again.

Akber Husain


Re: HTML Email and Spanish/Portuguese Characters

$
0
0

Well after some hit and trial the email looked OK in SOST but it got messed up in lotus notes. We think its has something to do the email client rather than SAP.

Re: SAP GUI 7.30 tool

Re: Alternative to Domain Value Range in table maintenance dialogue?

$
0
0

Hi Alex,

 

Easy way is creating domain with fixed value.

other way is modifying maintenance screen.

 

Tolga

Re: convert BAPI tables parameter data from structure to transparent table

$
0
0

Hi Eric,

 

I think you missunderstand ABAP table logic.

 

Internal table is not database table, It's local array for program, so you can not use SELECT for this situation. If you want to access to data in your table you can use READ or LOOP:

 

data : ls_T_BAPI2080_1 like line of T_BAPI2080_1

" declare work area for your table, if your table has header line you dont need this and in code you dont have to write into statement, but you can not use table with header line in Object oriented ABAP.

 

READ T_BAPI2080_1

   INTO ls_T_BAPI2080_1

WITH KEY <field> = <value>

 

Or :

 

LOOP AT T_BAPI2080_1

      INTO ls_T_BAPI2080_1.

"in here you can use where condition like SELECT statement

 

ENDLOOP.

 

I hope this will help.

Tolga

Re: CDHDR and CDPOS; using Z***_WRITE_DOCUMENT , abort with  CD 328: DUPREC

$
0
0

Hi,

 

I assume you know that the 'DUPREC' error message means 'Duplicate Record'?

 

I would guess that he is/was trying to write an identical CDHDR record to the database, perhaps because he did not update the date/time in the custom program.

 

cheers

Paul

Viewing all 10425 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>