How to convert the 3.x ABAP Routines into BI 7 ABAP Routines

Hi All,
I am trying to convert a BI 3.x data flow into BI 7 data flow suing DTP's.
But i am stuck at Transformations. We have used several Routines in 3.X data flow and those routines are not converted automatically into the new data flow.
Is there any other tool or program whcih will convert the ABAP routines automatically into the new ABAP format.
my sample ABAP 3.x Code looks like this in Start routine,
LOOP AT DATA_PACKAGE.
    IF (     DATA_PACKAGE-CPPVLC  EQ 0
         AND DATA_PACKAGE-CPPVOC  EQ 0
         AND DATA_PACKAGE-CPSTLC  EQ 0
         AND DATA_PACKAGE-CPQUAOU EQ 0
         AND DATA_PACKAGE-CPSVLC  EQ 0 ).
      DELETE DATA_PACKAGE.
      CONTINUE.
    ENDIF.
I tried to replace DATA_PACKAGE with SOURCE_PACKAGE, but it did not work.
any help will be appreciated.
Cheers
POPS

I tried to replace DATA_PACKAGE with SOURCE_PACKAGE, but it did not work.
When you use SOURCE_PACKAGE it will not have header line so you need to use workarea.
Use something like
LOOP AT SOURCE_PACKAGE into WA_SOURCE_PACKAGE.
Define WA_SOURCE_PACKAGE of type SOURCE_PACKAGE.
and replace further data_package in the code with WA_SOURCE_PACKAGE
Hope this helps.
Edited by: Praveen G on Jan 27, 2009 4:10 AM

Similar Messages

  • How to convert the String "1+1==2" into the boolean true?

    Hi folks!
    I need your help...
    In a Java program, I have a String such as
    String str="1+1==2";
    and I want to know if the content of this String is true or not.
    How to get the answer in a boolean b?
    I already know that
    boolean b=Boolean.valueOf(str).booleanValue();
    doesn't work (b contains false);
    whereas when I try
    boolean b=Boolean.valueOf("true").booleanValue();
    it perfectly works (b is true).
    Would you be so kind as to solve my problem?
    Thanks ;)
    Tropouf

    referring to the original poster...
    Hi folks!
    I need your help...
    In a Java program, I have a String such as
    String str="1+1==2";
    and I want to know if the content of this String is true or not.
    How to get the answer in a boolean b?How can the content of a String ever be a boolean ? and we all know that one...
    If he were to revise his orginal requirement things would not be so
    difficult for him.
    "1+1==2" and "2*12-2*10==2" have one thing in common. They both check if the
    RHS is equal to 2 or not...and THAT is a boolean.
    And if that is a String it takes no genius to figure out how to
    get a number out of them.
    What's the problem with getting his boolean result.

  • How to Convert the content in BLOB field into a PDF file...

    Hi,
    I am having PDF files stored in BLOB column of a table in Oracle Database (11G R2).
    I want to retrieve the files back and store them in hard disk. I am successful in storing the content as a file with '.doc' but if I store the file as '.pdf', adobe fails to open the file with error
    Adobe Reader could not open file 'xxx.pdf' because it is either not a supported file type or because the file has been damaged (for example it was sent as an email attachment and wasn't correctly decoded)
    I am using following example code to achieve my goal...
    Declare
    b blob;
    c clob;
    buffer VARCHAR2(32767);
    buffer_size CONSTANT BINARY_INTEGER := 32767;
    amount BINARY_INTEGER;
    offset NUMBER(38);
    file_handle UTL_FILE.FILE_TYPE;
    begin
    select blob_data into b from blobdata where id=1;
    c := blob2clob(b);
    file_handle := UTL_FILE.FOPEN('BLOB2FILE','my_file.pdf','w',buffer_size);
         amount := buffer_size;
         offset := 1;
         WHILE amount >= buffer_size
         LOOP
              DBMS_LOB.READ(c,amount,offset,buffer);
              -- buffer:=replace(buffer,chr(13),'');
              offset := offset + amount;
              UTL_FILE.PUT(file_handle,buffer);
              UTL_FILE.FFLUSH(file_handle);
         END LOOP;
         UTL_FILE.FCLOSE(file_handle);
    end;
    create or replace FUNCTION BLOB2CLOB ( p_blob IN BLOB ) RETURN CLOB
    -- typecasts BLOB to CLOB (binary conversion)
    IS
    || Purpose : To Convert a BLOB File to CLOB File
    || INPUT : BLOB File
    || OUTPUT : CLOB File
    || History: MB V5.0 24.09.2007 RCMS00318572 Initial version
    ln_file_check NUMBER;
    ln_file_size NUMBER;
    v_text_file CLOB;
    v_binary_file BLOB;
    v_dest_offset INTEGER := 1;
    v_src_offset INTEGER := 1;
    v_warning INTEGER;
    lv_data CLOB;
    ln_length NUMBER;
    csid VARCHAR2(100) := DBMS_LOB.DEFAULT_CSID;
    V_LANG_CONTEXT NUMBER := DBMS_LOB.DEFAULT_LANG_CTX;
    BEGIN
    DBMS_LOB.createtemporary (v_text_file, TRUE);
    SELECT dbms_lob.getlength(p_blob) INTO ln_file_size FROM DUAL;
    DBMS_LOB.converttoclob (v_text_file, p_blob, ln_file_size, v_dest_offset, v_src_offset, 0, v_lang_context, v_warning);
    SELECT dbms_lob.getlength(v_text_file) INTO ln_length FROM DUAL;
    RETURN v_text_file;
    END;

    user755667 wrote:
    Hi,
    I am having PDF files stored in BLOB column of a table in Oracle Database (11G R2).
    I want to retrieve the files back and store them in hard disk. I am successful in storing the content as a file with '.doc' but if I store the file as '.pdf', adobe fails to open the file with error
    Adobe Reader could not open file 'xxx.pdf' because it is either not a supported file type or because the file has been damaged (for example it was sent as an email attachment and wasn't correctly decoded)
    I am using following example code to achieve my goal...
    Declare
    b blob;
    c clob;
    buffer VARCHAR2(32767);
    buffer_size CONSTANT BINARY_INTEGER := 32767;
    amount BINARY_INTEGER;
    offset NUMBER(38);
    file_handle UTL_FILE.FILE_TYPE;
    begin
    select blob_data into b from blobdata where id=1;
    c := blob2clob(b);
    file_handle := UTL_FILE.FOPEN('BLOB2FILE','my_file.pdf','w',buffer_size);
         amount := buffer_size;
         offset := 1;
         WHILE amount >= buffer_size
         LOOP
              DBMS_LOB.READ(c,amount,offset,buffer);
              -- buffer:=replace(buffer,chr(13),'');
              offset := offset + amount;
              UTL_FILE.PUT(file_handle,buffer);
              UTL_FILE.FFLUSH(file_handle);
         END LOOP;
         UTL_FILE.FCLOSE(file_handle);
    end;
    create or replace FUNCTION BLOB2CLOB ( p_blob IN BLOB ) RETURN CLOB
    -- typecasts BLOB to CLOB (binary conversion)
    IS
    || Purpose : To Convert a BLOB File to CLOB File
    || INPUT : BLOB File
    || OUTPUT : CLOB File
    || History: MB V5.0 24.09.2007 RCMS00318572 Initial version
    ln_file_check NUMBER;
    ln_file_size NUMBER;
    v_text_file CLOB;
    v_binary_file BLOB;
    v_dest_offset INTEGER := 1;
    v_src_offset INTEGER := 1;
    v_warning INTEGER;
    lv_data CLOB;
    ln_length NUMBER;
    csid VARCHAR2(100) := DBMS_LOB.DEFAULT_CSID;
    V_LANG_CONTEXT NUMBER := DBMS_LOB.DEFAULT_LANG_CTX;
    BEGIN
    DBMS_LOB.createtemporary (v_text_file, TRUE);
    SELECT dbms_lob.getlength(p_blob) INTO ln_file_size FROM DUAL;
    DBMS_LOB.converttoclob (v_text_file, p_blob, ln_file_size, v_dest_offset, v_src_offset, 0, v_lang_context, v_warning);
    SELECT dbms_lob.getlength(v_text_file) INTO ln_length FROM DUAL;
    RETURN v_text_file;
    END;I skimmed this and stopped reading when i saw the BLOB to CLOB function.
    You can't convert binary data into character based data.
    So very likely this is your problem.

  • Converting the layout from OTF format into PDF

    Hi Experts,
    I am new to SMART FORMS,I don't have a clue about how to convert the layout from OTF format into PDF format and how to store it in Presentation server.
    Please send me a Model program or step by step approach of the same.
    Useful inputs will be rewarded higher points.
    Thanks in Advance,
    Dharani

    Hi,
    The steps are given below:-
    1) First get the name of your generated function module for the smartforms.
    2) Then call the generated function module.
    3) Then use the FM:CONVERT_OTF' to convert into PDF as shown below:-
    call function 'CONVERT_OTF'
        EXPORTING
          format                = 'PDF'
        IMPORTING
          bin_filesize          = w_pdf_len
          bin_file              = w_pdf_xstring
        TABLES
          OTF                   = OUTPUT_DATA-OTFDATA
          LINES                = LT_LINES
        EXCEPTIONS
          err_max_linewidth     = 1
          err_format            = 2
          err_conv_not_possible = 3
          err_bad_otf           = 4
          others                = 5.
    Hope this is clear.
    Pravat.
    <i>*Reward points if helpful.</i>

  • How to convert the report english to germany in abap

    Hi guys,
    How to convert the report english to germany in abap and any manual code or function module.
    please give the solution.

    you need to maintain all the text in text element and maintain text translation..
    goto> translations

  • How to convert special characters in ABAP to XML?

    Hi All.
    We have a scenario where from XI (exchange Infrastructure), a BAPI is called which returns an XML. From that XML, a PDF is generated.
    Now, if the XML contains any special characters, it will fail.
    So if any CHinese char or >, # etc signs are there, it fails.
    Can you please tell me how to convert my string in ABAP to a proper XML?
    I am new to it and I was trying the following code
    DATA: today TYPE string,
          result TYPE string.
    today = 'This is testing'.
    CALL TRANSFORMATION ID
         SOURCE today = today
         RESULT XML result.
    IF sy-subrc = 0.
      WRITE result.
    ENDIF.
    But it does not return me anything.
    Thanks in adv.

    hi
    good
    go through these links,hope these would help you to solve your problem
    http://www.sap-press.de/download/dateien/792/sappress_abapreference_2edition.pdf
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c2567f2b-0b01-0010-b7b5-977cbf80665d
    thanks
    mrutyun^

  • How to Convert the Warning Message to Error Message in Standard Transaction

    Hi,
        I face one problem in Standard Transaction Code CS02. In that  by entering the material Number, Plant, bomstatus press enter. it gives a warning message. How to convert the Warning message to Error. In abap how to do that. Please help me.

    Mohan,
    It appears that there is some configuration you can do for BOM Message types to change the message type.  The IMG link for this function is:
    Production->Basic Data->Bill of Material->General Data->Change Message Type
    However you need to read the IMG documentation to see if this will work for you.  There are only certain messages that can be changed with this configuration step.
    Also, please do not double post questions in the forums.
    Best Regards,
    Chris H.

  • How to convert the javasource file(*.class) to execute file(*.exe)?

    How to convert the javasource file(*.class) to execute file(*.exe)?
    thank you!

    Although i have seen a few programs (that are platform specific) that will embed a small jvm into an exe with your class file, it is generally excepted that you cannot create an executable file using java. The JAR executable file is probably the closest your going to get
    Pete

  • I have a MacBook Pro, I want to copy Itunes files to an SD card to play in my car, the SD Card doesn't appear in Itunes when I insert it, and I don't know how to convert the files to the correct format, can anyone help?

    I have a MacBook Pro, I want to copy Itunes files to an SD card to play in my car, the SD Card doesn't appear in Itunes when I insert it, and I don't know how to convert the files to the correct format, can anyone help?
    Thank you

    So it seems from reading the COMMAND manual that my first issue is that I used a 16GB SD card, and the manual says it will only recogize up to a 2GB SD card. I did use my MB Air's SD card slot and crated a folder and dragged the music files to it, then to the card. So I am going to get a 2GB card and try that next. Otherwise just stick with the iPOD connected. At least that is 8GB

  • How to save the data of ABAP report into a notepad in desktop location???

    HI all,
    Can any one tell me how to transfer the data of ABAP report into a Notepad.
    Actually I have to schedule a ABAP report in background on daily basis and I want to transfer the
    whole record into Notepad.
    If any program is available for this..please clearify the relevent code for transferring.
    Thanks
    Rajeev

    declare a character type internal table.
    now move your data from it_data ( internal table with data ) into table itab.
    since you are running this report in background, you cannot save it to the desktop. Instead give any app server location
    data: itab(400) occurs 0 with header line.
    field-symbols: <fs1> type any.
    data: gv_file type rlgrap-filename default 'TEST.TXT'.
    data: gv_filepath type rlgrap-filename default <path>.
    LOOP AT it_data.
        DO 100 TIMES.
          ASSIGN COMPONENT sy-index OF STRUCTURE it_data TO <fs1>.
          IF sy-subrc = 0.
            CONCATENATE itab <fs1> INTO itab SEPARATED BY ' '.
          ELSE.
            EXIT.
          ENDIF.
        ENDDO.
        SHIFT itab LEFT DELETING LEADING ' '.
        APPEND itab.
        CLEAR itab.
      ENDLOOP.
      concatenate gv_filepath '/' gv_file into gv_file.
      OPEN DATASET gv_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc = 0.
        LOOP AT itab.
          TRANSFER itab TO gv_file.
        ENDLOOP.
        CLOSE DATASET gv_file.
      ENDIF.

  • How to convert the character value to currency/numeric

    Hi,
    See the sample code here
    data: v_qtr_field(7).
    data: w_low_limit like glt0-kslvt,
          w_amount like glt0-hslvt.
    w_low_limit = 02.
    w_max_period = 3.
    concatenate 'HSL' w_low_limit into v_qtr_field.
    *comment
    *I am looking for a field formation thru above code like in GLT0 table like HSL02,HSL03 *etc based on the value user entered in the selection *screen
    DO w_max_period TIMES
      VARYING w_amount FROM v_qtr_field NEXT v_qtr_field + 1.
       t_trans_values-dmbe2 = t_trans_values-dmbe2 + w_amount.
      ENDDO.
    I am facing problem in the Do loop as it wont allows multiple data types. can you suggest me how to convert the v_qtr_field whose data type is character to currency?

    Hi,
    Please check this code .
    PERFORM write_currency
                  USING buf_anla-urwrt t_dates-waers t_txw_anla-urwrt.
    *       FORM WRITE_CURRENCY                                           *
    *       convert currency amount to string                             *
    *       - use decimal point                                           *
    *       - remove separator characters                                 *
    *  -->  P_AMOUNT                                                      *
    *  -->  P_CURRENCY_UNIT                                               *
    *  -->  P_STRING                                                      *
    FORM WRITE_CURRENCY
         USING P_AMOUNT        TYPE P
               P_CURRENCY_UNIT LIKE TCURC-WAERS
               P_STRING        TYPE C.
      DATA: DEC2POINT(2) TYPE C VALUE ',.'.
    * convert separator to decimal point
      WRITE P_AMOUNT TO P_STRING CURRENCY P_CURRENCY_UNIT
            NO-GROUPING
            NO-SIGN
            LEFT-JUSTIFIED.
      TRANSLATE P_STRING USING DEC2POINT.
    * put minus sign before number
      IF p_amount < 0.
        SHIFT P_STRING RIGHT.
        P_STRING(1) = '-'.
      ENDIF.
    ENDFORM.
    <i>Hope This Info Helps YOU.</i>
    Regards,
    Lakshmi

  • How to convert the alv list data into pdf format

    Hi Expersts,
                      Is it possible to convert the alv list output data into PDF format? if yes, then please help me with this issue.
    thanks in advance,
    Regards,
    Samad

    hii samad,
    you can go through these link.i hope it ll solve your purpose
    How to convert list output to PDF
    Display ALV list output in PDF format
    regards,
    Shweta

  • How to convert the Report Builder output to .xls

    Dear All,
    Let me please know how to convert the Report Builder output to Excel Format.
    As there are having the facility to convert the output in .PDF or .HTML format but i want to convert that into Excel Sheet......
    Please Guide me in this regards
    Thanks in advance
    Regards,
    Vishal......

    Hello,
    If your question is about the format spreadsheet, it is not possible from Reports Builder :
    http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwwhthow/whatare/output/output_a_simpleexcel.htm
    Restrictions
    It is not possible to generate spreadsheet output directly from Reports Builder. Instead, on the command line, you can run the report using rwrun or Reports Server clients (rwservlet, rwclient, rwcgi), with DESFORMAT=SPREADSHEET. You cannot store DESFORMAT=SPREADSHEET as a system parameter value in the report definition (.rdf file).
    Regards

  • How to convert the class in the one package to same class in the other pack

    How to convert the class in the one package to same class in the other package
    example:
    BeanDTO.java
    package cho3.hello.bean;
    public class BeanDTO {
    private String name;
    private int age;
    * @return
    public int getAge() {
         return age;
    * @return
    public String getName() {
         return name;
    * @param i
    public void setAge(int i) {
         age = i;
    * @param string
    public void setName(String string) {
         name = string;
    BeanDTO.java in other package
    package ch03.hello;
    public class BeanDTO {
    private String name;
    private int age;
    * @return
    public int getAge() {
         return age;
    * @return
    public String getName() {
         return name;
    * @param i
    public void setAge(int i) {
         age = i;
    * @param string
    public void setName(String string) {
         name = string;
    My converter lass lokks like
    public class BeanUtilTest {
         public static void main(String[] args) {
              try
                   ch03.hello.BeanDTO bean=new ch03.hello.BeanDTO();
              bean.setAge(10);
              bean.setName("mahesh");
              cho3.hello.bean.BeanDTO beanDto=new cho3.hello.bean.BeanDTO();
              ClassConverter classconv=new ClassConverter();
              //classconv.
              System.out.println("hi "+beanDto.getClass().toString());
              System.out.println("hi helli "+bean.toString()+" "+bean.getAge()+" "+bean.getName()+" "+bean.getClass());
              Object b=classconv.convert(beanDto.getClass(),(Object)bean);
              System.out.println(b.toString());
              beanDto= (cho3.hello.bean.BeanDTO)b;
              System.out.println(" "+beanDto.getAge()+" "+beanDto.getName() );
              }catch(Exception e)
                   e.printStackTrace();
    But its giving class cast exception. Please help on this..

    Do you mean "two different layers" as in separate JVMs or "two different layers" as in functional areas running within the same JVM.
    In either case, if the first class is actually semantically and functionally the same as the second (and they are always intended to be the same) then import and and use the first class in place of the second. That's beyond any question of how to get the data of the first into the second if and when you need to.
    Once you make the breakthrough and use one class instead of two I'd guess that almost solves your problem. But if you want to describe your architecture a little that would help others pin down want you're trying to do.

  • How to debug the method in abap program

    How to debug the method in abap program ?
    Could you please give the solution.
    Thanks
    sai

    Hi ,
    Place break point at call method .
    It takes u in to the method implementation .
    Here u can analyse the method implementation ...
    Reward if useful
    Thanks
    Jagadeesh.G

Maybe you are looking for

  • Redirect jsp page problem

              I have problem when I want to redirect a page, inputparam2test.jsp back to the perious           page, inputparam1test.jsp. Everything works until I           add a "if" statement in the inputparam1test.jsp.           The error is "Error 50

  • Upgrade results in loss of preferences and Update Centre paths

    I have just upgraded to EA7. Having started to use SqlDev in earnest I had changed some preference settings. So I checked the ReadMe and was disappointed to find that it's still not possible to export preferences, What the document didn't say, but ou

  • Printing logo at a specified position in main window in sap script

    Hi, I need to print a logo just after the signature which is coming in the main window, So basically i need to call a var(secondary) window inside the main window just after the signature and the position of logo should be towards the right. I tried

  • Would like Photoshop to open photos instead of Preview

    How can I set it up so when I double click on a photo file, it will automatically open in Photoshop, instead of the Preview? Thanks.

  • Touchpad scroller won't work in Windows 7

    Hey, I just upgraded from Windows XP to Windows 7. After upgrading, the vertical scroller on the touchpad doesn't work. Apparently a lot of people have solved this problem by using Alps or Synaptics drivers for Vista, but it didn't work for me.  Any