Convertion of number into sentence

i want to convert the number into sentence. i their is any short cut way to covert the number like 1,400,250 into "I million forty thousand two hundred and fifty"

Hi,
Please have a look on this thread.
Re: Try This Code (Number to Charcter)
Regards

Similar Messages

  • Convert rounded number into two decimal places

    Hi All,
    I have a Number 156 stired in a column having number(10,2);
    but i want to update it into 156.00......
    May be simple,,,,but how?
    Edited by: 887268 on May 29, 2012 10:04 AM

    Hi,
    156
    156.00
    156.0000000000000 and
    00000156.0000 are all the same NUMBER. There's nothing to convert.
    If you want to display a NUMBER in a certain way (e.g., with 2 digits after the decimal point) then use TO_CHAR, or have your front end format the column. In SQL*Plus, for example, you can use the COLUMN command:
    COLUMN   sal     FORMAT  99999.99
    SELECT  ename
    ,       sal
    FROM    scott.emp
    ;Output:
    ENAME            SAL
    SMITH         800.00
    ALLEN        1600.00
    WARD         1250.00
    JONES        2975.00
    ...

  • Converting a number into years, months and days...

    Hi everyone,
    I have a number say 399.
    I need to know how many years and months constitute that number.
    For eg 399 would be 1yr, 1 month and 4 days.
    So I need the answer as 1 yr and 1 month.
    Is there any inbuilt funtion to say this?
    Thanks
    Kishore

    following a quick (and dirty) solution.
    What about the leap years?
    define v_startdate='01-01-2003'
    define v_juliandays=399
    SELECT
    TRUNC (         MONTHS_BETWEEN ( TO_DATE('&&v_startdate','MM-DD-YYYY') + &&v_juliandays,
                                     TO_DATE('&&v_startdate','MM-DD-YYYY')
                                   )/12) "Years",
    TRUNC ( MOD (   MONTHS_BETWEEN ( TO_DATE('&&v_startdate','MM-DD-YYYY') + &&v_juliandays,
                                     TO_DATE('&&v_startdate','MM-DD-YYYY')
                                   ) ,12)) "Months"
    FROM DUAL;

  • Converting a number into world In spanish Language

    Hi Gurus
    I am using database in Spanish Language and character Set.
    MY database is medium size but when I use following query
    I get out put in English Language
    select to_char(to_date(1,'JSP'),'JSP') from dual
    output as
    ONE
    How can I get this output in spanish Language
    such as
    UNO , DOS ect...
    Help me pLease
    Bhushan

    This is a function provided by Barbara Boehmer (sometime back). You would just need to modify the french to spanish
    CREATE OR REPLACE FUNCTION number_to_words
               (p_number   IN NUMBER,
                p_language IN VARCHAR2 DEFAULT 'E')  RETURN VARCHAR2   AS
    v_length INTEGER         := 0;
    v_num1   VARCHAR2 (50)   := NULL;
    v_num2   VARCHAR2 (50)   := NULL;
    v_words  VARCHAR2 (4000) := NULL;
    v_words1 VARCHAR2 (4000) := NULL;
    v_words2 VARCHAR2 (4000) := NULL;
    TYPE myarray IS TABLE OF VARCHAR2 (255);
    v_str myarray := myarray ('',
                              ' thousand ',
                              ' million ',
                              ' billion ',
                              ' trillion ',
                              ' quadrillion ',
                              ' quintillion ',
                              ' sextillion ',
                              ' septillion ',
                              ' octillion ',
                              ' nonillion ',
                              ' decillion ',
                              ' undecillion ',
                              ' duodecillion ');
    BEGIN
      IF TO_CHAR (p_number) LIKE '%.%'    THEN
         IF SUBSTR (p_number, INSTR (p_number, '.') + 1) > 0  THEN
            v_num2 := SUBSTR (p_number, INSTR (p_number, '.') + 1);
            v_length := LENGTH (v_num2);
            FOR i IN 1 .. v_length  LOOP
               EXIT WHEN v_num2 IS NULL;
               IF LENGTH (v_num2) > 0  THEN
                  IF SUBSTR (v_num2, 1, 1) = '0'  THEN
                     v_words1 := v_words1 || ' zero';
                  ELSE
                     v_words1 := v_words1
                                 || ' '
                                 || TO_CHAR (TO_DATE (SUBSTR (v_num2, 1, 1), 'j' ), 'jsp' );
                  END IF;
               END IF;
               v_num2 := SUBSTR (v_num2, 2);
            END LOOP;
            IF UPPER (p_language) = 'F' THEN
               v_words1 := REPLACE (v_words1, 'nine', 'neuf');
               v_words1 := REPLACE (v_words1, 'eight', 'huit');
               v_words1 := REPLACE (v_words1, 'seven', 'sept');
               v_words1 := REPLACE (v_words1, 'five', 'cinq');
               v_words1 := REPLACE (v_words1, 'four', 'quatre');
               v_words1 := REPLACE (v_words1, 'three', 'trois');
               v_words1 := REPLACE (v_words1, 'two', 'deux');
               v_words1 := REPLACE (v_words1, 'one', 'un');
            END IF;
            v_words1 := ' point' || v_words1;
         END IF;
      END IF;
      v_num1 := TRUNC (p_number);
      FOR i IN 1 .. v_str.count  LOOP
         IF v_num1 = '0'  THEN
            v_words2 := 'zero';
         END IF;
         EXIT WHEN v_num1 IS NULL;
         IF (SUBSTR (v_num1, LENGTH (v_num1) - 2, 3) <> 0)  THEN
             v_words2 := TO_CHAR (TO_DATE (SUBSTR (v_num1, LENGTH
                                                  (v_num1) - 2, 3), 'j' ), 'jsp')
                         || v_str (i)
                         || v_words2;
         END IF;
         v_num1 := SUBSTR (v_num1, 1, LENGTH (v_num1) - 3);
      END LOOP;
      IF UPPER (p_language) = 'F'  THEN
         v_words2 := REPLACE (v_words2, 'duodecillion', 'bidecillion');
         v_words2 := REPLACE (v_words2, 'quintillion', 'cintillion');
         v_words2 := REPLACE (v_words2, 'billion', 'milliard');
         v_words2 := REPLACE (v_words2, 'thousand', 'mille');
         v_words2 := REPLACE (v_words2, 'hundred', 'cent');
         v_words2 := REPLACE (v_words2, 'ninety', 'quatre-vingt-dix');
         v_words2 := REPLACE (v_words2, 'eighty', 'quatre-vingt');
         v_words2 := REPLACE (v_words2, 'seventy', 'soixante-dix');
         v_words2 := REPLACE (v_words2, 'sixty', 'soixante');
         v_words2 := REPLACE (v_words2, 'fifty', 'cinquante');
         v_words2 := REPLACE (v_words2, 'forty', 'quarante');
         v_words2 := REPLACE (v_words2, 'thirty', 'trente');
         v_words2 := REPLACE (v_words2, 'twenty', 'vingt');
         v_words2 := REPLACE (v_words2, 'nineteen', 'dix-neuf');
         v_words2 := REPLACE (v_words2, 'eighteen', 'dix-huit');
         v_words2 := REPLACE (v_words2, 'seventeen', 'dix-sept');
         v_words2 := REPLACE (v_words2, 'sixteen', 'seize');
         v_words2 := REPLACE (v_words2, 'fifteen', 'quinze');
         v_words2 := REPLACE (v_words2, 'fourteen', 'quatorze');
         v_words2 := REPLACE (v_words2, 'thirteen', 'treize');
         v_words2 := REPLACE (v_words2, 'twelve', 'douze');
         v_words2 := REPLACE (v_words2, 'eleven', 'onze');
         v_words2 := REPLACE (v_words2, 'ten', 'dix');
         v_words2 := REPLACE (v_words2, 'nine', 'neuf');
         v_words2 := REPLACE (v_words2, 'eight', 'huit');
         v_words2 := REPLACE (v_words2, 'seven', 'sept');
         v_words2 := REPLACE (v_words2, 'five', 'cinq');
         v_words2 := REPLACE (v_words2, 'four', 'quatre');
         v_words2 := REPLACE (v_words2, 'three', 'trois');
         v_words2 := REPLACE (v_words2, 'two', 'deux');
         v_words2 := REPLACE (v_words2, 'one', 'un');
         v_words2 := REPLACE (v_words2, 'dix-six', 'seize');
         v_words2 := REPLACE (v_words2, 'dix-cinq', 'quinze');
         v_words2 := REPLACE (v_words2, 'dix-quatre', 'quatorze');
         v_words2 := REPLACE (v_words2, 'dix-trois', 'treize');
         v_words2 := REPLACE (v_words2, 'dix-deux', 'douze');
         v_words2 := REPLACE (v_words2, 'dix-un', 'onze');
         v_words2 := REPLACE (v_words2, '-un ', '-une ');
         v_words2 := REPLACE (v_words2, 'un cent', 'cent');
         v_words2 := REPLACE (v_words2, 'un mille', 'mille');
         v_words2 := REPLACE (v_words2, 'une', 'un');
      END IF;
      v_words := v_words2 || v_words1;
      RETURN v_words;
    END number_to_words;
    [pre                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Essbase 9.3 Calc scripts. Pb with dates. How to convert (string = number) ?

    Hello,
    I've a problem with Essbase(Planning?) Scripts on version 9.3. It looks simple but I do not find any (clean) solution :
    On my Essbase database, I have a member called "Reference_Date" on my axis Indicators. It is a date data type, that is to say, it displays a number corresponding to a YYYYMMDD format. For example : 20091029 for October 29th 2009.
    In calc scripts I often need to compare the month included in that "Reference_Date" with the current Member of my Time Axis (I have 12 Months members based on the format M02 for February for example). The final aim is to calculate a number of complete years since that "Reference_Date".
    But theses two elements are not of the same "type" (one is a number value and the other is a "member" in Time Axis). So I'm forced to convert one of this two elements in order to compare it.
    For example I can extract the month value of the "Reference_Date"' and put an "M" before it to have a Time member equivalent or I can convert the member Name M10 to a number (10))
    in both cases I have the same type problem : I don't know how to convert a string into a number nor how to convert a number into a string.
    (For example @CONCATENATE doesn't work with numbers). and that my only remaining problem.
    I didn't find any Essbase Function which do this (conversion number <=>string).
    Is anyone have an Idea ?
    Thanks for your help
    Best regards

    I don't know any way for you to compare your data against your metadata. Not directly. To me it makes little enough sense to try that I'm not surprised the developers didn't provide for it.
    I've converted member names to strings, manipulated the strings (calc script functions are not good at this), and turned them back into member names, but that's really the only use I've had for string manipulation. I don't think an equivalency operator even exists for string data. And I see no way to begin thinking of a member name, once converted to a string, as a number.
    It makes even less sense to me to try thinking of a data value as a string. Even text values in Sys 11 are stored as numbers. Not encoded characters, but just a number to look up somewhere.
    I think you can do what you want though, with something like this...
    IF (@ISMBR("FY08"))
    vYr = 2008;
    ELSEIF (@ISMBR("FY09"))
    vYr = 2009;
    ENDIF;
    IF (@ISMBR("M01"))
    vMth = 1;
    ELSEIF (@ISMBR("M02"))
    vMth = = 2;
    ENDIF;
    "Years_Since_Reference" = ((vYr * 100) + Mth) - ("Reference_Date" / 12);
    Obviously, the math will need some work, coz that doesn't actually work, but the logic above essentially turns your metadata into numbers, which is what you are after.
    Good luck,
    -- Joe

  • How to insert an array of number into access database?

    How can I insert an array of numbers(double) into an access database and later read them back to an array I labview. I don't have the Database Connectivity toolset. I would prefer using the LABSQL or other free solution. Any idea on how to solve this. I have tried LABSQL and SQL commands, but when I do that I have to convert the number to a string and then make a SQL-command string. Is there a way where I don't have to convert the number into a string?

    Hello,
    I am not familiar with LABSQL and we do not do any support on that particular product. However I still want to give you some information on how to proceed. You can either store the array to binary format and by doing this you can save an entire array to one single element of the database. The other alternative is of course to save one-to-one in other words one element of the array in one element in the database.
    More info can be found here:
    http://digital.ni.com/public.nsf/websearch/3FE68BBDA95E845986256DB4006A22C0?OpenDocument
    Have you checked MSDN for information regarding this? You might be able to find useful SQL code there to use.
    Regards,
    Jimmie A.
    Applications Engineer, National Instruments
    Regards,
    Jimmie Adolph
    Systems Engineer Manager, National Instruments Northern Region
    Bring Me The Horizon - Sempiternal

  • How to convert exponential data into number for the downloaded excelsheet

    Hi
    I have downloaded one field data i.e. having char of 50,  into excel sheet and it is displaying as  exponential in the excel sheet. 
    The data numbers should display as text only i.e 1236547896321 and not exponential
    Is anyone can tell how we can do this
    Thanks
    Pallavi

    Hello Pallvai,
    The problem of exponential is with the excel. Excel converts the large numbet into exponential.
    To avoid this you can make the number into text then excel won't convert it into exponential.
    For that you can do a simple trick. Just prefix a single quote ( ' ) in the field.
    eg:
    field = 1236547896321.
    then,
    constants c_quote type c value '''.   "<-- single quote
    concatenate c_quote field into field.
    " This will make the EXCEL to consider this field as text not number and hence it will not be considered
    " as exponential.
    Hope this solves your problem.
    Regards,
    Sachinkumar Mehta

  • How do i convert a plain number into hh:mm:ss

    Below is a part of my spreadsheet i am setting up for travelling.
    The driving time number is derived from a "IF" calculation that divides the "Distance" by a number depending upon the selection in the "Road" column (Data validation list)
    The calculation is corect i would just like to know how to format the "6.9125" to show 6:54:45. I have a desktop calculator that will convert plain numbers into hh-mm-ss would just like to do this in my spreadsheet.
    This is the formula that the 6.9125 is derived from
    =IF([@ROAD]="Bitumen",[@DISTANCE]/80,IF([@ROAD]="Dirt",[@DISTANCE]/50,IF([@ROAD]="Track",[@DISTANCE]/30,IF([@ROAD]="4WD",[@DISTANCE]/15,0))))
    Thanks in advance for the help
    Regards
    Andrew
    DISTANCE
    ROAD
    DRIVING TIME
    553
    Bitumen
    6.9125
    0
    It is better to temporarily fail with a plan that will ultimately succeed than to temporarily succeed with a plan that must ultimately fail

    Change the formula to
    =IF([@ROAD]="Bitumen",[@DISTANCE]/80,IF([@ROAD]="Dirt",[@DISTANCE]/50,IF([@ROAD]="Track",[@DISTANCE]/30,IF([@ROAD]="4WD",[@DISTANCE]/15,0))))/24
    and format the cell with the formula with the custom format h:mm:ss, or if it is possible that driving times are over 24 hours, use [h]:mm:ss
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • HT4061 Hello, I was wondering if you could convert the IMEI # into the serial number using letters and digits?

    Hello, I was wondering if you could convert the IMEI # into the serial number using letters and digits?

    No the imei from what I understand is a randomly given number. to get serial number you must have it. you can try supportprofile.apple.com and login.

  • Convert and split Hexa number into ASCII

    Hai
          How to convert Hexa number to equivalent ASCII number
     i attached my VI
    thanks
    sk
    I am using LabVIEW 7.1
    Attachments:
    HEX2ASCII.vi ‏31 KB

    It really depends on what you want. For example you want to "split the hexa number 1A into 1 and A". Should the output be a string or another U8 number?
    Attached are a few possibilities.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    HEX2ASCIImod.vi ‏51 KB

  • Convert OutputText's Number into Terabytes

    Hi,
    I have the following requirement where we display the Storage Volume size (for ex:11929649152 bytes) as an output text.
    Do we have any number format component in adf to convert this number (11929649152) into Terabytes.
    Thanks,
    Kiran

    Create a new custom jsf converter for your requirement.
    http://download.oracle.com/docs/cd/B31017_01/web.1013/b28967/web_val006.htm
    Regards,

  • How can I convert a number field in a to Date?

    I have two columns in a table, and i would like to concate this two fiels to read Januaray-2010
    CREATE TABLE "CATDB"."SC_DTL_MEASURE_DETAIL"
               "TIME_YEAR"                 NUMBER(*,0),
               "TIME_INCREMENT"            NUMBER(*,0),
       )Time_Incriment data need to be changed to month MON Januaray to December
    1
    2
    3
    etc
    12
    Time_year data is
    2010
    2010
    etc

    Well one way easiy way without changing your column datatypes (this would be the best way) is to first convert the numbers into text. Then concat this text. Then convert the text into a date value. Then print the date value as you want it to appear.
    example
    with testdata as (select 2010 TIME_YEAR, 1 TIME_INCREMENT from dual union all
                      select 2010 TIME_YEAR, 12 TIME_INCREMENT from dual)
    select time_year, time_increment,
           to_char(to_date('01-'||to_char(TIME_INCREMENT,'FM00')||'-'||to_char(TIME_YEAR,'FM0000'),'DD-MM-YYYY') ,'FMMonth-YYYY')
    from testdata;
    2010     1     January-2010
    2010     12     December-2010

  • How can I convert table object into table record format?

    I need to write a store procedure to convert table object into table record. The stored procedure will have a table object IN and then pass the data into another stored procedure with a table record IN. Data passed in may contain more than one record in the table object. Is there any example I can take a look? Thanks.

    I'm afraid it's a bit labourious but here's an example.
    I think it's a good idea to work with SQL objects rather than PL/SQL nested tables.
    SQL> CREATE OR REPLACE TYPE emp_t AS OBJECT
      2      (eno NUMBER(4)
      3      , ename  VARCHAR2(10)
      4      , job VARCHAR2(9)
      5      , mgr  NUMBER(4)
      6      , hiredate  DATE
      7      , sal  NUMBER(7,2)
      8      , comm  NUMBER(7,2)
      9      , deptno  NUMBER(2));
    10  /
    Type created.
    SQL> CREATE OR REPLACE TYPE staff_nt AS TABLE OF emp_t
      2  /
    Type created.
    SQL> Now we've got some Types let's use them. I've only implemented this as one public procedure but you can see the principles in action.
    SQL> CREATE OR REPLACE PACKAGE emp_utils AS
      2      TYPE EmpCurTyp IS REF CURSOR RETURN emp%ROWTYPE;
      3      PROCEDURE pop_emp (p_emps in staff_nt);
      4  END  emp_utils;
      5  /
    Package created.
    SQL> CREATE OR REPLACE PACKAGE BODY emp_utils AS
      2      FUNCTION emp_obj_to_rows (p_emps IN staff_nt) RETURN EmpCurTyp IS
      3          rc EmpCurTyp;
      4      BEGIN
      5          OPEN rc FOR SELECT * FROM TABLE( CAST ( p_emps AS staff_nt ));
      6          RETURN rc;
      7      END  emp_obj_to_rows;
      8      PROCEDURE pop_emp (p_emps in staff_nt) is
      9          e_rec emp%ROWTYPE;
    10          l_emps EmpCurTyp;
    11      BEGIN
    12          l_emps := emp_obj_to_rows(p_emps);
    13          FETCH l_emps INTO e_rec;
    14          LOOP
    15              EXIT WHEN l_emps%NOTFOUND;
    16              INSERT INTO emp VALUES e_rec;
    17              FETCH l_emps INTO e_rec;
    18          END LOOP;
    19          CLOSE l_emps;
    20      END pop_emp;   
    21  END;
    22  /
    Package body created.
    SQL>Looks good. Let's see it in action...
    SQL> DECLARE
      2      newbies staff_nt :=  staff_nt();
      3  BEGIN
      4      newbies.extend(2);
      5      newbies(1) := emp_t(7777, 'APC', 'CODER', 7902, sysdate, 1700, null, 40);
      6      newbies(2) := emp_t(7778, 'J RANDOM', 'HACKER', 7902, sysdate, 1800, null, 40);
      7      emp_utils.pop_emp(newbies);
      8  END;
      9  /
    PL/SQL procedure successfully completed.
    SQL> SELECT * FROM emp WHERE deptno = 40
      2  /
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM
        DEPTNO
          7777 APC        CODER           7902 17-NOV-05       1700
            40
          7778 J RANDOM   HACKER          7902 17-NOV-05       1800
            40
    SQL>     Cheers, APC

  • Adobe Product API for converting mulptiple formats into PDF and to Embed PDF into PDF ?

    Hi Team,
    Is there any adobe product that allow us to convert multiple formats into .pdf format and also allow us to attach (embed) other pdf files object into a pdf, is there any .net API for that, I want to do this through programming.
    Regards
    Amit

    We want to use this product for our application, for the purpose of converting different files formats into a PDF file and also for attaching files into a single PDF using a web application and windows service. I have to evaluate some features and point regarding this product which are as below:
    1. PDF form creation in future requirement.
    2. Maximum files size that i can convert into PDF.
    3. Memory management when converting N number of files.
    4. Compatibility with C#, .Net Framework 4.0, using MS Visual Studio 2010.
    5. Support of the product for future.
    6. Primary requirement to use PDFLiveCyle for above features.
    7. Basic guidelines before using PDFLiveCyle.
    8. Ease of coding using PDFLiveCyle.
    9. 32bit or 64bit support.
    10. Lisencing information
    Regards
    Amit Mishra

  • Converting spool request into multiple pdf formated documents

    Hi Guys,
                 I am designing a report with several pages of output and running it in background.
    Is there a possibility to convert each page into an separate pdf format document ?
    If I use ALV report as output, if its more than page, do I face any issue with pdf conversion.
    Thanks

    Check the Following code, This might be helpful:
    form rstxpdft4 using filename.
    * Read spool job contents (OTF or ABAP list) and convert
    * to PDF, download PDF
      data: download  value 'X'.
      data: lv_filename like rlgrap-filename.
      lv_filename = filename.
      data otf like itcoo occurs 100 with header line.
      data cancel.
      data pdf like tline occurs 100 with header line.
      data doctab like docs occurs 1 with header line.
      data: numbytes type i,
            arc_idx like toa_dara,
            pdfspoolid like tsp01-rqident,
            jobname like tbtcjob-jobname,
            jobcount like tbtcjob-jobcount,
            is_otf.
      data: client like tst01-dclient,
            name like tst01-dname,
            objtype like rststype-type,
            type like rststype-type.
      select single * from tsp01 where rqident = gt_rq-rqident.
      if sy-subrc <> 0.
        write: / 'Spool request does not exist', gt_rq-rqident
                color col_negative.
        exit.
      endif.
      client = tsp01-rqclient.
      name   = tsp01-rqo1name.
      call function 'RSTS_GET_ATTRIBUTES'
           exporting
                authority     = 'SP01'
                client        = client
                name          = name
                part          = 1
           importing
                type          = type
                objtype       = objtype
           exceptions
                fb_error      = 1
                fb_rsts_other = 2
                no_object     = 3
                no_permission = 4.
      if objtype(3) = 'OTF'.
        is_otf = 'X'.
      else.
        is_otf = space.
      endif.
      if is_otf = 'X'.
        call function 'CONVERT_OTFSPOOLJOB_2_PDF'
             exporting
                  src_spoolid              = gt_rq-rqident
                  no_dialog                = ' '
             importing
                  pdf_bytecount            = numbytes
                  pdf_spoolid              = pdfspoolid
                  btc_jobname              = jobname
                  btc_jobcount             = jobcount
             tables
                  pdf                      = pdf  .
      else.
        call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
             exporting
                  src_spoolid              = gt_rq-rqident
                  no_dialog                = ' '
             importing
                  pdf_bytecount            = numbytes
                  pdf_spoolid              = pdfspoolid
                  btc_jobname              = jobname
                  btc_jobcount             = jobcount
             tables
                  pdf                      = pdf
    *************** download PDF file ***********
    v_filename = lv_filename.
    *  call function 'WS_DOWNLOAD'
    *       exporting
    *            bin_filesize            = numbytes
    *            filename                = lv_filename
    *            filetype                = 'BIN'
    *       tables
    *            data_tab                = pdf
    *       exceptions
    *            file_open_error         = 1
    *            file_write_error        = 2
    *            invalid_filesize        = 3
    *            invalid_type            = 4
    *            no_batch                = 5
    *            unknown_error           = 6
    *            invalid_table_width     = 7
    *            gui_refuse_filetransfer = 8
    *            customer_error          = 9
    *            others                  = 10.
    *  if sy-subrc <> 0.
    ** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    **         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *  else.
    *    gv_count = gv_count + 1.
    *  endif.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        BIN_FILESIZE                    = numbytes
        FILENAME                        = v_filename
        FILETYPE                        = 'BIN'
    *   APPEND                          = ' '
    *   WRITE_FIELD_SEPARATOR           = ' '
    *   HEADER                          = '00'
    *   TRUNC_TRAILING_BLANKS           = ' '
    *   WRITE_LF                        = 'X'
    *   COL_SELECT                      = ' '
    *   COL_SELECT_MASK                 = ' '
    *   DAT_MODE                        = ' '
    *   CONFIRM_OVERWRITE               = ' '
    *   NO_AUTH_CHECK                   = ' '
    *   CODEPAGE                        = ' '
    *   IGNORE_CERR                     = ABAP_TRUE
    *   REPLACEMENT                     = '#'
    *   WRITE_BOM                       = ' '
    *   TRUNC_TRAILING_BLANKS_EOL       = 'X'
    *   WK1_N_FORMAT                    = ' '
    *   WK1_N_SIZE                      = ' '
    *   WK1_T_FORMAT                    = ' '
    *   WK1_T_SIZE                      = ' '
    *   WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
    *   SHOW_TRANSFER_STATUS            = ABAP_TRUE
    * IMPORTING
    *   FILELENGTH                      =
      TABLES
        DATA_TAB                        = pdf .
    *   FIELDNAMES                      =
    Thanks.

Maybe you are looking for