Export to text creates extra line

I've created a number of fixed width extract reports that will be used to upload data into another system.  The files, in general, are fine, however Crystal Reports 2008 is adding an extra line to the end of the file.  This is causing the upload to fail.
I've created several. extract reports before, so I reviewed a sample extract from a report I created in Crystal Reports XI R2 and it, too, had the same issue.
Googling indicates that others have had the same issue, but I have yet to find a resolution to the problem.
Has anybody else encountered this and do you know how to resolve the issue?
Thank you, Kurt

Hi Kurt,
In my scheduler app I have a command line option to remove (or replace characters) in the resulting export file.  This was developed for exactly that reason (so there is a special option to remove/replace only the last character in the file).
You can develop the same approach.  Alternatively, there are more direct upload options (the export can go directly into a database table).
hth,
- Ido

Similar Messages

  • Created extra line to be deleted

    Data in temp.ps after running my program is:
    % p +newText.map
    p +pfr.map
    p +pfu.map
    p +poa.map
    From my program, after each execution of the program, a line gets inserted into temp.ps after the line % p +newText.map. From my code the necessary is happening. But a line space is getting inserted each time as shown above.
    But I need as:
    % p +newText.map
    p +pfr.map
    p +pfu.map
    p +poa.map
    My code is:
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.IOException;
    public class updatetemp
         public updatetemp()
         public static void main(String args[]) throws IOException
              String new="InsertText";
              String Path="D:\\temp\\";
              mainclass(new, Path);
         public static void mainclass(String new, String Path) throws IOException 
              int val;
              char ch;
              File inputfile=new File(""+Path+"\\"+"temp\\temp.ps");
              File inputfileTmp=File.createTempFile(inputfile.getName(),"tmp");               
              BufferedReader br=null;
              BufferedWriter bw=null;
              String line;
              try
                   br=new BufferedReader(new FileReader(inputfile));
                   bw=new BufferedWriter(new FileWriter(inputfileTmp));
                   while((line=br.readLine())!=null)
                        if(line.startsWith("% p +newText.map"))
                                            line = LineChange(line,new);                                       
                        bw.write(line);                               
                        bw.newLine();
                        bw.flush();
              catch(IOException e)
                   System.out.println(e.getMessage());
              finally
                   try
                        br.close();
                   catch(Exception e)
                   try
                        bw.close();
                   catch(Exception e)
              if(inputfile.delete())
                   inputfileTmp.renameTo(inputfile);
         private static String LineChange(String line, String new)
                    String rep="";
              rep=line.replace(line,line+"\n\rp +"+new+".map");        
              return rep;
    }

    Input data consists of:
    [some lines of text]
    % p +newText.map
    [some lines of text]
    From my program, when it comes across the line % p +newText.map, it inserts a new line just below it. The insertion of the line is happening, but when I execute the program subsequent times, a line space gets inserted.
    What is it supposed to do if a line does not start with that String?
    The String % p +newText.map is constant in the input data
    Message was edited by:
    sony_tj

  • Automatic Payment Run - Generate Extra line items

    Hi All,
    We need to create extra line items when automatic payment (F110) is run because we need sub-fund entries.
    For example:
    Automatic payment will create:
    Vendor a/c Dr.
    Unpresented Cheque a/c Cr.
    We need:
    Vendor a/c Dr.
    Sub-Fund a/c Dr.
    Unpresented Cheque a/c Cr.
    Sub-Fund a/c Cr.
    This is a requirement specific to our organisation. We need to add these extra line items while F110 is running and before document is posted. We have checked all the user-exits for transaction F110 and didn't find anything to add this.
    Any suggestions/ideas is highly appreciated.
    Regards,
    Sougata.

    Hi Sougata.
    Need to create Substitution rules (transaction OBBH) and within those rules you can define user exits (ZGGBS000 for e.g.). In those user exits, you can split the lines based on Document type (ZP, ZV) for automatic payment clearing.
    This is a customization + ABAP intensive approach, but is a approach that is supported by SAP and I have used it in the past to split document lines at any stage in their processing. It has been a while though and I don't have any examples to give you.
    Hope that helps!
    Rishi

  • CRXI Export to text - suppressed section creates blank lines

    I'm using CRXI Proffesional - full version 11.5.11.1470
    I have a report that uses the typical "stealth" subreport to obtain and pass info to the container, but remains invisible in preview mode. The fields in the subreport are all suppressed, the sections in the subreport are suppressed if blank and the subreport itself is suppressed when blank, the section that contains the subreport is also suppressed if blank.
    This has always worked fine to get info into the container from the subreport while not creating any "white space" on the report.
    Print preview and export to pdf both function just fine, omitting the blank lines.
    It seems that exporting this to a text file is now creating blank lines for each occurence of the subreport.
    I have seen this problem in a couple of forums but have not seen a resolution yet.
    Does anybody have any idea how I can stop the exporting of suppressed blank sections ?

    Good morning.
    We've got something to get straight first
    When you say "...from the Report Viewer. The report printed as expected on HP printer...", do you mean the viewer of the .NET app, or the viewer of the CR designer?
    And version 12.0.0.683, is very old (well as far as CR is concerned anyhow   ). That version is SP 1, we are now on SP 2. So that will be the place to start. Get to SP 2 which can be downloaded from here;
    https://smpdl.sap-ag.de/~sapidp/012002523100009038092009E/cr2008win_sp2.exe
    Ludek

  • Is there a way to create a heading with shading behind the text and thin lines above and below?

    I'm working with InDesign CS6, Windows 7.
    Is there a way, using paragraph rules, to create a heading with shading behind the text and thin lines above and below the text?
    I'd like to create headings that look like these:
    Thank you!

    I have a document where I almost do such, but without the fill. I use a Head Style which Spans Columns for this instance; it allows the haeds to flow and fill the width.
    Paragraph Rules above and below are turned on with plenty of offset.
    I tweaked my setting to accomodate your need - It required only one instance, not above and below, and changing the stroke to a double stroke. 
    It may be necessary to create a custom stroke to modify the proportion of stroke vs fill. There is a difference of thin-thin and  thick-thick, neither of which seemed perfect but might be dependent on the Character height.
    Creating custom strokes is accomplished via the Strokes Panel.

  • Receiver file  adapter creates an innecesarry extra line

    Hi,
    I have an issue with an extra line that add the receiver file adapter with the content conversion.
    The file XML that the file adapter has to convert, is the next;
    <root>
    <cofig>
      <FileName>NameOfTheFile.txt</FileName>
      </cofig>
    <lines>
    <line>
      <data>BBBBBBBBBBBBBBBBBBBBBB</data>
      <data>Aaaaaaaaaaaaaaaaaaaaaa</data>
    </lines>
    </root>
    Because FileName is not necessary, I remove it with:
    cofig.fieldFixedLengths 0
    cofig.fixedLengthTooShortHandling CUT
    but it leaves an empty line that i don't want. that is, the text in the file start in the second line.
    Any help?
    Thank you in advance.

    Can you do a small change in your mesg. structure ?
    change it to....
    <root>
    <lines>
    <line>
    <data>BBBBBBBBBBBBBBBBBBBBBB</data>
    <data>Aaaaaaaaaaaaaaaaaaaaaa</data>
    </lines>
    <i><b><cofig>
    <FileName>NameOfTheFile.txt</FileName>
    </cofig></b></i>
    </root>
    and then use
    cofig.fieldFixedLengths 0
    cofig.fixedLengthTooShortHandling CUT
    followed by
    endSeparator 0
    Ref: Suppressing Field In Receiver File Adapter for more details.

  • There's a random extra line text on the login screen?!

    I would love if someone could help me figure this one out... (Just installed 10.7)
    From my first Lion log in after the update: Just above the Sleep, Restart, and Shut Down buttons on the Lion Login Screen is an extra line of text. It's definitely there on purpose (it look all pretty and formatted in a nice little band) but I have NO CLUE where it came from or where the setting/option is to change what it says!
    The text is my old company name, which changed over a year ago and all traces of it on the user profile and address book have been omitted or updated. We haven't used this name in a long time, and were very thorough in making sure all instances were updated, so that's why I'm having a hard time understanding where this buried piece of information came from and how Apple has justified grabbing it and using it on the welcome screen... What is the source of this text? I want to update it to the correct name!
    And no, it's not the computer's name, which I also thought of. That's currently set to "Mac Pro." Any ideas at all?

    Aha! Do/did you have Onyx installed?
    Onyx system utility allowed users to make a change to the file called com.apple.loginwindow.plist. It's located in Macintosh -> Library -> Preferences, and it's a locked system file.
    Onyx allowed you to edit the contents of that file and put in your own custom message. I must have done it one mine a while back (don't remember). Apparently for some people, after upgrading to Lion, the message is still there but they can't edit it anymore. The only version of Onyx that works now is the new beta version, but it still doesn't have this option.
    Anyway, here's a website with instructions on how to edit it:
    http://hints.macworld.com/article.ph...20921074429845
    I haven't tried this because my System Preferences option took care of it. Hope this helps!

  • Adobe Reader highlight tool no longer filling text, just creating a line around the text

    The Highlight tool in Adobe reader is no longer working as it used to.  Instead of filling the text, as it used to, the tool just creates a line around the text.  This makes the highlights much harder to spot.
    I'm running Win 8 and using Adobe Reader XI version 11.0.09.
    I've attached a screenshot to illustrate.  The way the tool used to work, they way I want it to, is shown by all the highlighted text in the document.  The way it currently works, is shown on the first line of text , where a portion of the text has been highlighted using the tool as it works now.  I just creates a yellow line around the text.
    I've checked the way the highlight settings are on both the old highlighted text and the new text and they appear identical.  Both the colour and opacity percentage settings are the same.
    Very frustrated.  Any help appreciated.

    Gilad D (try67) wrote:
    Very strange. I'm not sure what the reason for this behaivour is, but try right-clicking one of the previous highlights and selecting "Make Current Properties Default". Then try to create a new highlight...
    Did that.  No effect.

  • [SOLVED] How to Create an Image from UTF8 Text via Command-line

    As the title points out, I'm trying to create an image from unicode text via command line. I tried...
    convert -pointsize 48 -size 400 caption:测试用 text.png
    But that results in question marks for the Chinese characters. So searching around online I discovered that I needed to specify a font which could display the characters. The characters show up just fine in Firefox, KDE, Kate, Terminal, etc so I know I have a font which can render them. I thought it might be DejaVu but this also resulted in question marks...
    convert -font /usr/share/fonts/TTF/DejaVuSerif.ttf -pointsize 48 -size 400 caption:测试用 text.png
    Any ideas?
    Last edited by tony5429 (2011-01-31 23:17:41)

    DejaVu doesn't contain those Chinese glyphs at all, so please don't blame ImageMagick for not rendering them.
    So, Firefox, Kate, Terminal and the others you stated to use DejaVu, if encounter these characters, fall back to some other fonts to render them. These fonts are, however, not vector, but bitmap fonts. (This can be seen if you increase text size (Ctrl++ in Firefox): the Chinese characters don't change, they remain of their inherent size.)
    Actually, e.g. /usr/share/fonts/misc/18x18ko.pcf.gz definitely contains the three example characters, so the mentioned apps may use this font as fall back.
    Apparently ImageMagick doesn't handle bitmap fonts (I'm not sure), so you won't be able to hit your original target. Anyway, since you tried to parse "-pointsize 48", you wouldn't be satisfied with the font size.
    Your only choice seems to be using the above mentioned CJK-approved TTFs.
    EDIT: typo
    Last edited by barto (2011-01-28 21:52:33)

  • GUI_DOWNLOAD : Extra Line

    Hi All,
    I am downloading the the internal table into a flat file using GUI_DOWNLOAD.
    I am getting an extra line at the end which is not required.
    I have debugged and found the content is correct.
    However in note pad a blank line apprers.
    Any help would be great.
    reagrds,

    REPORT  ZPP_GROSS_REQUIREMENT_UPLOAD.
    data : zwerks like BAPISITEMR-PLANT.
    DATA : BEGIN OF ITAB_REQ OCCURS 0,
              RECTYPE(4),
              PLANT(3),
              MATERIAL(12),
              MAT_TYPE(1),
              START_DATE(8),
              END_DATE(8),
              QTY(14),
              SIGN(1),
              FILLER(9),
           END OF ITAB_REQ.
    DATA : BEGIN OF ITAB_REQ2 OCCURS 0,
              RECTYPE(4),
              PLANT(3),
              MATERIAL(12),
              MAT_TYPE(1),
              START_DATE(8),
              END_DATE(8),
              QTY(14),
              SIGN(1),
              FILLER(9),
           END OF ITAB_REQ2.
    DATA : BEGIN OF ITAB_PLAN OCCURS 0,
            MANDT TYPE SY-MANDT,
            PLANNO LIKE ZPP_PLAN_NUMBER-PLANNO,
            PLNTIME LIKE ZPP_PLAN_NUMBER-PLNTIME,
            PLNDATE LIKE ZPP_PLAN_NUMBER-PLNDATE,
            ACTIVE LIKE ZPP_PLAN_NUMBER-ACTIVE,
           END OF  ITAB_PLAN .
    DATA : BEGIN OF ITAB_STATUS  OCCURS 0,
            MATERIAL LIKE MARA-MATNR,
            TYPE(1),
            DESC(200),
           END OF ITAB_STATUS  .
    data : p1(14) type p decimals 5.
    data : p2(13) type p decimals 3.
    data : p(15) type C.
    DATA : REQ_OUT LIKE BAPISITMEO OCCURS 0 WITH HEADER LINE,
           REQ_OUT1 LIKE BAPISITMEO OCCURS 0 WITH HEADER LINE,
           RET2 LIKE BAPIRETURN1 OCCURS 0 WITH HEADER LINE.
    DATA : REQ_IN LIKE BAPISSHDIN OCCURS 0 WITH HEADER LINE,
           RET3  LIKE BAPIRETURN1 OCCURS 0 WITH HEADER LINE.
    DATA : BEGIN OF T1 OCCURS 0 ,
            MATNR LIKE MARA-MATNR,
            DATE_TYPE TYPE BAPISSHDIN-DATE_TYPE,
            REQ_DATE TYPE BAPISSHDIN-REQ_DATE,
            REQ_QTY TYPE BAPISSHDIN-REQ_QTY,
            UNIT TYPE BAPISSHDIN-UNIT,
          END OF T1.
    DATA: BEGIN OF ITAB_OLDPLAN OCCURS 0,
            MANDT TYPE ZPP_PLAN_NUMBER-MANDT,
            PLANNO TYPE ZPP_PLAN_NUMBER-PLANNO,
            PLNTIME TYPE ZPP_PLAN_NUMBER-PLNTIME,
            PLNDATE TYPE ZPP_PLAN_NUMBER-PLNDATE,
            ACTIVE TYPE ZPP_PLAN_NUMBER-ACTIVE,
           END OF ITAB_OLDPLAN.
    DATA: BEGIN OF ITAB_OLDPLAN1 OCCURS 0,
            MANDT TYPE ZPP_PLAN_NUMBER-MANDT,
            PLANNO TYPE ZPP_PLAN_NUMBER-PLANNO,
            PLNTIME TYPE ZPP_PLAN_NUMBER-PLNTIME,
            PLNDATE TYPE ZPP_PLAN_NUMBER-PLNDATE,
            ACTIVE TYPE ZPP_PLAN_NUMBER-ACTIVE,
           END OF ITAB_OLDPLAN1.
    DATA : PLNNO TYPE I.
    DATA : PLNNO1(10) TYPE C.
    DATA : PLNNO_NEW TYPE I.
    DATA : PLNNO_NEW1(10) TYPE C.
    DATA : RET LIKE BAPIRETURN1 OCCURS 0 WITH HEADER LINE.
    DATA : SCHEDULE_IN LIKE BAPISSHDIN OCCURS 0 WITH HEADER LINE.
    DATA : ITEMS LIKE BAPISITEMR OCCURS 0 WITH HEADER LINE .
    DATA : BEGIN OF T OCCURS 0,
             MATERIAL(12),
             DATE_TYPE(1),
             REQ_DATE LIKE SY-DATUM,
             REQ_QTY(13),
           END OF T.
    DATA : L_DATTIME(10) .
    *DATA : D1 like VTBBEWE-DBERVON, D2 like VTBBEWE-DBERBIS, D3 like VTBBEWE-ATAGE.
    DATA : D1 TYPE D, D2 TYPE D, D3 TYPE I.
    DATA QN(9) TYPE C.
    DATA DEC(9) TYPE C.
    DATA : TMAT(12).
    DATA : ACTIVE_REQ LIKE BAPISITEMR-REQ_NUMBER,
           DEACTIVE_REQ(10) TYPE C .
    SELECTION-SCREEN BEGIN OF BLOCK BLK WITH FRAME TITLE TEXT-001.
    PARAMETER: P_FILE TYPE STRING DEFAULT
                                          'c:\data\gross_upload.txt'.
    *PARAMETER: P_PLAN LIKE AM60X-PBDNR.
    *PARAMETER: P_OLDPLN LIKE BAPISITEMR-REQ_NUMBER.
    SELECTION-SCREEN END OF BLOCK BLK.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
      PERFORM GETFILE_NAME CHANGING P_FILE.
    TOP-OF-PAGE.
      WRITE :/35  '** GROSS REQUIREMENT UPLOAD **'.
      WRITE :/35  '******************************'.
    START-OF-SELECTION.
    perform CHECK_PLAN_NUMBER USING P_OLDPLN.
      PERFORM READ_FILE.  "Reads the input file using GUI_UPLOAD.
      PERFORM GET_OLD_PLAN. " GETS THE OLD PLAN NUMBER.
      PERFORM CREATE_PLAN_NUMBER. " Creates a new plan number for this week.
      PERFORM CREATE_GROSS_REQUIREMENT. " Creates the gross requirement.
      PERFORM WRITE_STATUS.
    *&      Form  READ_FILE
          Reads the input file using GUI_UPLOAD.
    -->  p1        text
    <--  p2        text
    FORM READ_FILE .
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                      = P_FILE
       FILETYPE                      = 'DAT'
      HAS_FIELD_SEPARATOR           = ' '
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            =
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
        TABLES
          DATA_TAB                      = ITAB_REQ
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
       DESCRIBE TABLE ITAB_REQ LINES LIN.
         IF SY-TABIX = '1' OR SY-TABIX = LIN.
           CONTINUE.
         ENDIF.
    delete ITAB_REQ where MATERIAL+11(1) = 'I' and MAT_TYPE = 'P'.
    ENDFORM.                    " READ_FILE
    *&      Form  CREATE_GROSS_REQUIREMENT
          Creates the gross requirement
    -->  p1        text
    <--  p2        text
    FORM CREATE_GROSS_REQUIREMENT .
    *read table ITAB_REQ with  key RECTYPE = 'OP01'.
    *zwerks =  ITAB_REQ-PLANT.
      DELETE ITAB_REQ WHERE  RECTYPE NE 'PFAI'.
      SORT ITAB_REQ  BY MATERIAL.
      ITAB_REQ2[] = ITAB_REQ[] .
      DELETE ADJACENT DUPLICATES FROM ITAB_REQ2 COMPARING MATERIAL.
      LOOP AT ITAB_REQ .
        T-MATERIAL = ITAB_REQ-MATERIAL.
        D1 = ITAB_REQ-START_DATE.
        D2 = ITAB_REQ-END_DATE.
        IF D2 EQ '        '.
          D2 = D1 .
        ENDIF.
       D3 = D2 - D1.
       CALL FUNCTION 'CONVERT_DATE_FORMAT'
         EXPORTING
           I_DATE      = D1
         IMPORTING
           E_CALC_DATE = D1.
       CALL FUNCTION 'CONVERT_DATE_FORMAT'
         EXPORTING
           I_DATE      = D2
         IMPORTING
           E_CALC_DATE = D2.
       D3 = D2 - D1.
        CALL FUNCTION 'HR_SGPBS_YRS_MTHS_DAYS'
          EXPORTING
            BEG_DA     = D1
            END_DA     = D2
          IMPORTING
            NO_CAL_DAY = D3.
    *CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
    EXPORTING
       I_DATE_FROM          = d1
      I_KEY_DAY_FROM       = '00'
       I_DATE_TO            = d2
      I_KEY_DAY_TO         = '00'
      I_FLG_SEPARATE       = ' '
    IMPORTING
      E_DAYS               = d3
      E_MONTHS             =
      E_YEARS              =
        IF D3 < 7 AND D3 > 0.
          T-DATE_TYPE =  '2'. " Weekly
        ELSE.
          T-DATE_TYPE =  '3'. " Monthly
        ENDIF.
        IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        T-REQ_DATE = ITAB_REQ-START_DATE.
        QN = ITAB_REQ-QTY+0(9).
        DEC = ITAB_REQ-QTY+9(5).
        CONCATENATE QN '.' DEC INTO p.
        p1 = p.
       p2 = p1.
       T-REQ_QTY = p2.
    T-REQ_QTY = p.
      T-REQ_QTY = ITAB_REQ-QTY+0(9).
        APPEND T.
        CLEAR : T, D1, D2, D3.
      ENDLOOP.
      DATA PNO LIKE BAPISITEMR-REQ_NUMBER.
      LOOP AT ITAB_REQ2.
        LOOP AT T WHERE MATERIAL = ITAB_REQ2-MATERIAL.
          SCHEDULE_IN-DATE_TYPE =  T-DATE_TYPE .
          SCHEDULE_IN-REQ_DATE = T-REQ_DATE .
          SCHEDULE_IN-REQ_QTY = T-REQ_QTY.
          APPEND SCHEDULE_IN.
        ENDLOOP.
        ITEMS-MATERIAL = ITAB_REQ2-MATERIAL .
        ITEMS-PLANT = zwerks .
        ITEMS-REQU_TYPE = ' ' .
        ITEMS-VERSION = '00' .
        ITEMS-VERS_ACTIV = 'X'.
        ITEMS-REQ_NUMBER = L_DATTIME.
        ACTIVE_REQ = L_DATTIME.
       APPEND ITEMS.
       D1 = ITAB_REQ-START_DATE.
       D2 = ITAB_REQ-END_DATE.
       D3 = D2 - D1.
       IF D3 > 7.
         SCHEDULE_IN-DATE_TYPE =  '3'. " MONTHLY
       ELSE.
         SCHEDULE_IN-DATE_TYPE =  '2'. " WEEKLY
       ENDIF.
       SCHEDULE_IN-REQ_DATE = ITAB_REQ-START_DATE .
       SCHEDULE_IN-REQ_QTY = ITAB_REQ-QTY.
       APPEND SCHEDULE_IN.
        CALL FUNCTION 'BAPI_REQUIREMENTS_CREATE'
          EXPORTING
            REQUIREMENTS_ITEM              = ITEMS
      REQUIREMENT_PARAM              =
           DO_COMMIT                      = 'X'
           UPDATE_MODE                    = 'X'
      REFER_TYPE                     = ' '
      PROFILID                       = ' '
    IMPORTING
      MATERIAL                       =
      PLANT                          =
      REQUIREMENTSTYPE               =
      VERSION                        =
       REQMTSPLANNUMBER               =
      MRP_AREA                       =
      MATERIAL_EVG                   =
          TABLES
            REQUIREMENTS_SCHEDULE_IN       = SCHEDULE_IN
      REQUIREMENTS_CHAR_IN           =
            RETURN                         = RET
       if sy-subrc ne 0.
       loop at ret.
       write :/  ret.
       endloop.
       endif.
        ITAB_STATUS-MATERIAL = ITAB_REQ2-MATERIAL.
       ITAB_STATUS-TYPE = RET-TYPE.
        ITAB_STATUS-DESC = RET-MESSAGE.
        IF RET-MESSAGE IS INITIAL.
          ITAB_STATUS-DESC = 'Requirement Created '.
        ENDIF.
        APPEND ITAB_STATUS.
        CLEAR ITAB_STATUS.
        CLEAR SCHEDULE_IN.
        REFRESH SCHEDULE_IN.
        CLEAR ITAB_REQ2.
        CLEAR T.
      ENDLOOP.
      ITAB_PLAN-MANDT = SY-MANDT.
      ITAB_PLAN-PLANNO = L_DATTIME.
      ITAB_PLAN-PLNTIME = SY-UZEIT.
      ITAB_PLAN-PLNDATE = SY-DATUM.
      ITAB_PLAN-ACTIVE = 'X'.
      APPEND ITAB_PLAN.
      CLEAR ITAB_PLAN.
      INSERT ZPP_PLAN_NUMBER FROM TABLE ITAB_PLAN.
      IF SY-SUBRC = 0.
        COMMIT WORK.
      ENDIF.
    ENDFORM.                    " CREATE_GROSS_REQUIREMENT
    *&      Form  WRITE_STATUS
          text
    -->  p1        text
    <--  p2        text
    FORM WRITE_STATUS .
      WRITE :/ ' REQUIREMENT PLAN NUMBER ACTIVATED   : ', ACTIVE_REQ.
      WRITE :/ ' REQUIREMENT PLAN NUMBER DEACTIVATED : ', DEACTIVE_REQ.
      ULINE.
      IF NOT ITAB_STATUS[] IS INITIAL. " WRITES ERROR MESSAGES
        WRITE SY-ULINE(110).
        WRITE :/1 SY-VLINE NO-GAP,
                6 'Material Number',
                24 SY-VLINE NO-GAP,
               25 'Return Code',
               38 SY-VLINE NO-GAP,
                39 'Return Message',
                110 SY-VLINE NO-GAP.
        WRITE SY-ULINE(110).
        LOOP AT ITAB_STATUS.
          WRITE :/1 SY-VLINE NO-GAP,
                  6 ITAB_STATUS-MATERIAL,
                  24 SY-VLINE NO-GAP,
                 25 ITAB_STATUS-TYPE,
                 38 SY-VLINE NO-GAP,
                  39 ITAB_STATUS-DESC,
                  110 SY-VLINE NO-GAP.
        ENDLOOP.
        WRITE SY-ULINE(110).
      ENDIF.
    ENDFORM.                    " WRITE_STATUS
    *&      Form  getfile_name
          text
         <--P_P_FILE  text
    FORM GETFILE_NAME  CHANGING P_P_FILE.
      DATA : TMP_FILE LIKE RLGRAP-FILENAME.
      TMP_FILE = P_P_FILE.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
       EXPORTING
      PROGRAM_NAME        = SYST-REPID
      DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
      STATIC              = ' '
         MASK                = ' .'
        CHANGING
          FILE_NAME           = TMP_FILE
       EXCEPTIONS
         MASK_TOO_LONG       = 1
         OTHERS              = 2.
      IF SY-SUBRC = 0.
        P_P_FILE = TMP_FILE.
      ENDIF.
    ENDFORM.                    " getfile_name
    *&      Form  DEACTIVATE_OLD_REQUIREMENT
          text
    -->  p1        text
    <--  p2        text
    FORM DEACTIVATE_OLD_REQUIREMENT .
      CALL FUNCTION 'BAPI_REQUIREMENTS_GETDETAIL'
        EXPORTING
          MATERIAL               = ' '
          PLANT                  = zwerks
          REQUIREMENTSTYPE       = ' '
          VERSION                = '00'
          REQMTSPLANNUMBER       = ITAB_OLDPLAN-PLANNO
      MRP_AREA               =
      MATERIAL_EVG           =
        TABLES
         REQUIREMENTS_OUT        = REQ_OUT
          RETURN                 = RET2
      IF SY-SUBRC = 0.
        LOOP AT REQ_OUT.
          T1-MATNR = REQ_OUT-MATERIAL.
          T1-DATE_TYPE = REQ_OUT-DATE_TYPE.
          T1-REQ_DATE = REQ_OUT-REQ_DATE.
          T1-REQ_QTY = REQ_OUT-REQ_QTY.
          T1-UNIT = REQ_OUT-UNIT.
          APPEND T1.
          CLEAR T1.
        ENDLOOP.
        REQ_OUT1[] = REQ_OUT[].
        SORT REQ_OUT1 BY MATERIAL.
        DELETE ADJACENT DUPLICATES FROM REQ_OUT1 COMPARING MATERIAL.
        LOOP AT REQ_OUT1.
          LOOP AT T1 WHERE MATNR = REQ_OUT1-MATERIAL.
            REQ_IN-DATE_TYPE = T1-DATE_TYPE.
            REQ_IN-REQ_DATE  = T1-REQ_DATE.
            REQ_IN-REQ_QTY   = T1-REQ_QTY.
            REQ_IN-UNIT      = T1-UNIT.
            APPEND REQ_IN.
            CLEAR REQ_IN.
          ENDLOOP.
          CALL FUNCTION 'BAPI_REQUIREMENTS_CHANGE'
            EXPORTING
              MATERIAL                       = REQ_OUT1-MATERIAL
              PLANT                          = zwerks
              REQUIREMENTSTYPE               = ' '
              VERSION                        = '00'
              REQMTSPLANNUMBER               = ITAB_OLDPLAN-PLANNO
              VERS_ACTIV                     = ' '
        REQUIREMENT_PARAM              =
        MRP_AREA                       =
              DO_COMMIT                      = 'X'
              UPDATE_MODE                    = 'X'
              DELETE_OLD                     = 'X'
        NO_WITHDR                      = ' '
        MATERIAL_EVG                   =
      IMPORTING
        REQUIREMENT_ITEM_OUT           =
             TABLES
              REQUIREMENTS_SCHEDULE_IN       = REQ_IN
        REQUIREMENTS_CHAR_IN           =
              RETURN                         = RET3
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " DEACTIVATE_OLD_REQUIREMENT
    *&      Form  CHECK_PLAN_NUMBER
          text
    -->  p1        text
    <--  p2        text
    FORM CHECK_PLAN_NUMBER . "USING P_P_OLDPLN.
    DATA : ITAB_PBIM TYPE PBIM .
    DATA MSG TYPE STRING.
    SELECT SINGLE * FROM PBIM INTO ITAB_PBIM WHERE PBDNR = P_PLAN.
    IF SY-SUBRC = 0.
       CONCATENATE 'THE PLAN NUMBER :  ' P_PLAN ' ALREADY EXIST' INTO MSG.
       MESSAGE MSG TYPE 'E'.
    ENDIF.
    SELECT SINGLE * FROM PBIM INTO ITAB_PBIM WHERE PBDNR = P_OLDPLN.
    IF SY-SUBRC NE 0.
       CONCATENATE 'THE PLAN NUMBER :  ' P_OLDPLN ' DOES NOT EXIST' INTO MSG.
       MESSAGE MSG TYPE 'E'.
    ENDIF.
    ENDFORM.                    " CHECK_PLAN_NUMBER
    *&      Form  GENERATE_PLAN_NUMBER
          text
    -->  p1        text
    <--  p2        text
    FORM CREATE_PLAN_NUMBER.
      PLNNO_NEW1 = PLNNO_NEW.
      CONDENSE PLNNO_NEW1.
      CONCATENATE SY-DATUM+2(6) PLNNO_NEW1 INTO L_DATTIME.
    ENDFORM.                    " CREATE_PLAN_NUMBER
    *&      Form  GET_OLD_PLAN
          text
    -->  p1        text
    <--  p2        text
    FORM GET_OLD_PLAN .
      SELECT * FROM ZPP_PLAN_NUMBER INTO TABLE ITAB_OLDPLAN WHERE ACTIVE = 'X'.
      IF SY-SUBRC = 0.
        READ TABLE ITAB_OLDPLAN WITH KEY ACTIVE = 'X'.
        PLNNO1 = ITAB_OLDPLAN-PLANNO+6(4).
        CONDENSE PLNNO1.
        PLNNO = PLNNO1.
        read table ITAB_REQ with  key RECTYPE = 'OP01'.
        zwerks =  ITAB_REQ-PLANT.
        PERFORM DEACTIVATE_OLD_REQUIREMENT. " PREVIOUS PLAN IS DEACTIVATED.
        ITAB_OLDPLAN1[] = ITAB_OLDPLAN[].
        CLEAR ITAB_OLDPLAN.
        REFRESH ITAB_OLDPLAN.
        READ TABLE ITAB_OLDPLAN1 WITH KEY ACTIVE = 'X'.
        ITAB_OLDPLAN-PLANNO = ITAB_OLDPLAN1-PLANNO.
        ITAB_OLDPLAN-PLNTIME = ITAB_OLDPLAN1-PLNTIME.
        ITAB_OLDPLAN-PLNDATE = ITAB_OLDPLAN1-PLNDATE.
        ITAB_OLDPLAN-ACTIVE = ' '.
        APPEND ITAB_OLDPLAN.
        CLEAR ITAB_OLDPLAN.
        DEACTIVE_REQ = ITAB_OLDPLAN1-PLANNO.
        MODIFY ZPP_PLAN_NUMBER FROM TABLE ITAB_OLDPLAN.
        IF SY-SUBRC = 0.
          COMMIT WORK.
        ENDIF.
      ENDIF.
      PLNNO_NEW = PLNNO + 1.
    ENDFORM.                    " GET_OLD_PLAN

  • Email with text attachment with line width 1250

    Dear all,
                 I want to send the email with text attachment whose line width in text file is 1250. Kindly let me know how to send email attachment with more than 255 line width.
    Regards,
    Manoj
    Moderator Message: Frequently Asked Question. Please search for available information before posting.
    Edited by: kishan P on Apr 29, 2011 2:48 PM

    Hi,
    What ever text you are sending in the email, create a standard text for it using tcode SO10. In the program use the FM READ_TEXT to get the data into internal table which will be of length 132 char. If you want line widht of 255 chars convert using FM SX_TABLE_LINE_WIDTH_CHANGE as below,
    CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
        EXPORTING
          line_width_dst              = '255'
        TABLES
          content_in                  =  it_data
          content_out                 = it_mess_att
        EXCEPTIONS
          err_line_width_src_too_long = 1
          err_line_width_dst_too_long = 2
          err_conv_failed             = 3
          OTHERS                      = 4.
    Use FM SO_NEW_DOCUMENT_ATT_SEND_API1 to send email.
    Hope this will help you.
    regards,
    Tulasi.

  • Text in subtotal line using OO ALV

    Hi experts:
      Hope you can help me.
      I'm trying to create an ALV report with the layout like the below, where the line starting with ** means Subtotal line (i.e, I want to calculate subtotals at customer level).
       USER                NAME                   CUSTOMER                NAME                           INVOICE        AMOUNT
                   1     Constructoras Tal     2000001     100,00 u20AC
                   1     Constructoras Tal     2000002     23,00 u20AC
                   1     Constructoras Tal     2000003     34,00 u20AC
                   1     Constructoras Tal     2000004     45,00 u20AC
    *FSCMAs     Miguel Angel     Cerrado     1     Constructoras Tal          202,00 u20AC*  
    I know how to use method set_table_for_first_display adding the sort criteria to calculate the subtotal, but my question is: if I mark the subtot option for field CUSTOMER, the subtotal line currently displayed is    
    *+                                           1                                      202,00 u20AC+*    
    and I also want the other texts to be displayed in the subtotal line. I tryed by marking SUBTOT for al the fields I wnat to display, but this is creating extra subtotal lines.
    What I want is one subtotal line will all the texts, as described in the first layout.
    How can I do this (if possible)?.
    Thanks in advance for your answers.
    Regards,
    Carlos.

    1 Constructoras Tal 2000001 100,00 u20AC
    1 Constructoras Tal 2000002 23,00 u20AC
    1 Constructoras Tal 2000003 34,00 u20AC
    1 Constructoras Tal 2000004 45,00 u20AC
    *FSCMAs Miguel Angel Cerrado 1 Constructoras Tal 202,00 u20AC*

  • CSV export from SSRS gives a line break if there are two tables

    I have a report with two tables. There is no gap between in the reports. The report looks good when I run it, but when I export the report to CSV, there is an extra line between the two tables. Can somebody help me fix this issue.
    Thanks in advance.
     

    Hi Bindu,
    If I understand correctly, you have two tables in the report. When you export to CSV, it has an extra blank line between these two tables. I have create a simple report in my test environment, I can reproduce the same issue.
    Based on your description, you want to splice these two tables with no gap in the report. I order to meet your requirement, we can use subreport to work around the issue. We can insert two aubreports in one table. Then, display these two tables in these
    two subreports.
    Reference: Subreports
    Alternatively, we can display these data in one table to work around the issue. If possible, you can post your sample data, we can to do further analysis. If these columns is from two datasets, please check if there has same fields. If so, we can use
    Lookup function to display two datasets data in one tablix.
    Regards,
    Alisa Tang
    If you have any feedback on our support, please click
    here.
    Alisa Tang
    TechNet Community Support

  • Display a text with many lines

    is within WD UI Element availablw where by I can display a text with many lines ?
    Regards
    Marco M

    Hi,
    TextEdit uielement is available, which is like a text area; user can enter free text in para's,multiple lines ,etc.
    Steps:
    Like any other uielement, right click and insert the textedit uielement on your view.
    Create an attribute 'CA_TEXT'  type string and bind it with the value property of your text edit. 
    Change the cols and row property to adjust your text edit width and height.
    Use the following code to read the contents entered in the test edit,
    Data: l_elem type ref to if_wd_context_element.
    Data: l_text type string.
    l_elem = wd_context->get_element( ).
    l_elem->get_attribute( exporting name = 'CA_TEXT'
    importing value = l_text }. "l_text will now have  the contents of your text edit.
    Regards,
    Radhika.

  • A extra line on a navigattion bar?!

    Hi,
    I have created a navigation bar with a blue background and white
    text as a portlet. On the page when viewing Navigation bar, it
    appiers a white extra line near to the bottom of navigation bar.
    What is this? and How can I get rid of it?
    Thanks in advanced
    Regards
    /Mahnaz

    Try upgrading to the 3.0.9.8.1 patch, or wait for a couple of
    weeks for the 3.0.9.8.2 patch (the patches are a good idea, in
    an case). See if applying the patch fixes the problem. If not,
    please contact support for a patch for bug 1784120.
    Regards,
    Jerry

Maybe you are looking for

  • Insert All and  Insert

    Hi All, Please help to elaborate the difference between Insert All and Insert in oracle 10g. Thanks, regards,

  • 8350 I acting squirrely since downloadin​g OS update

    All sorts of unhappy things are going on since I updated my operating system. Perhaps the most annoying is the fact that I can no longer use every song in my song library as a potential ringtone. I had carefully chosen appropriate ringtones for indiv

  • Work schedule: Approval field for a position - How to get it in ABAP?

    Hi all, could you please help me to find out how to get in a ABAP report the value of field Approval (RHCSHORA-CPROZT) that is shown in the Work Schedule tab in OM (PPOSE tx), starting from a position id? E.g. 100,00 (% of Standard value) Thanks in a

  • Open Word From Java

    Hi all, Can we open word from java. It is possible from VB to do it, bit is it possible from Java. Thanks in advance for your help. Best regards. Saadi MONLA

  • Acrobat Pro installed on a Windows 2003 32bit server - where's the 64bit driver?

    Hello. I'm still newbie with Acrobat Pro so please bear with me if this is a silly question. A prospect of ours installed the TRIAL version of Acrobat Pro Extended on a 32bit Windows 2003 server and everything went fine; this server "serves" a number