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

Similar Messages

  • IF statement inserts extra line.

    I am having problems with IF statements inserting extra lines;
    POH_VENDOR_NAME<?if:POH_PO_NUM != ''?>(POH_PO_NUM)<?end if?>
    Returns:
    Consolidated Supplies
    (1085)
    Instead of:
    Consolidated Supplies (1085)
    I have tried using CHOOSE but get the same results. Any help appreciated.
    Thanks
    Carl.

    Hi Carl,
    Hope your development is going ok. Not sure why the choose wouldn't work with @inline, if the IF statement did. What I would suggest instead is using a series of IF statements. So <?if@inline:x=1?> and the opposite <?if@inline:x!=1?>
    Its a bit of a pain, but I can't think of any other way to get around this.
    Regards,
    Cj

  • 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

  • Not able to add extra line item in sales order - va01

    Hi friends,
    At the time of creation of sales order via va01.
    I am appending the my extra line item in xvbap. But on screen I am not able to view that extra line item.
    Could you please help me out with this problem.
    My code is given below.
    I am writting this code in MV45AFZB &
    in that FORM USEREXIT_CHECK_VBAP USING US_DIALOG.
    it_free_goods is the table in which i am having data which needs to be uploaded in xvbap.
      IF it_free_goods[] IS NOT INITIAL.
        LOOP AT it_free_goods INTO wa_free_goods.
          wa_xvbap-matnr = wa_free_goods-matnr.
          RV45A-MABNR  = wa_free_goods-matnr.
          VBAP-POSNR   = vbap-posnr + 10.
          wa_xvbap-kwmeng = wa_free_goods-menge.
          wa_xvbap-meins = wa_free_goods-meins.
          wa_xvbap-pstyv = co_pstyv.
          wa_xvbap-posnr = vbap-posnr + 10.
          wa_XVBAP-UPDKZ = 'I'.
          MOVE-CORRESPONDING wa_xvbap TO xvbap.
          APPEND xvbap.
         ENDLOOP.
       ENDIF.
    Please let me know if somethings needs to be changed.
    It will be very helpful for me,
    Thanks,
    Best Regards,
    Prashant

    Hi Prashanth,
    I believe the use of
    USEREXIT_CHECK_VBAP
    This user exit can be used to carry out additional checks (e.g. for completion) at item level
    Please check the following link which has a similar requirement
    Re: VA01/VA02  screen exit
    Regards
    Byju

  • Problem while inserting extra line item in XVBAP

    Hi Experts,
    I have to add extra line item in the Sale order through user exit.
    So i added new line item in the internal table XVBAK of the subroutine USEREXIT_SAVE_DOCUMENT_PREPARE (MV45AFZZ). Its working fine with the sales order. But when I create delivery of the same new iserted line item is not going to the delivery.
    Please give me solution...
    Thanks
    Sameer

    Hi Sameer,
    i think, you have added the line in XVBAP - not in XVBAK.
    And what's about VBEP - without an entry in VBEP, there will be no delivery note. There are also several indexes for the delivery.
    I hav'n dared to put an extra Line into the oder while Save_prepare.
    Perhaps try the bapi for order changing.
    You can get the new order-number while userexit Save. Save the need of change in an extra teble and change is via bapi with a background - job.
    Hans

  • GUI_DOWNLOAD blank lines in the middle

    Hi All,
    I am using 'GUI_DOWNLOAD' FM to create excel file of my internal table data; Internal table is having 220 fields and expects to create 220 columns in excel file;
    In the middle of the excel file I get several blank lines on and off with only very few column values are filled;
    I checked the ITAB in debug before calling the FM it has no issues and has the correct data;
    My code is as below;
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = l_filename
          filetype                = 'ASC'
          write_field_separator   = 'X'
        TABLES
          data_tab                = i_compare
          fieldnames              = i_excel_head
        EXCEPTIONS
          file_write_error        = 1
    Appreciate your expert ideas please;
    Thank you
    Iver

    Hi,
    GUI_DOWNLOAD blank lines in the middle
    In your GUI_DOWNLOAD code, There is no mistake.
    I think, In your program, have you written any SET BLANK LINES ON.
    It is one case.
    Follow this link,
    http://wiki.sdn.sap.com/wiki/display/ABAP/DownloadinginternaltablestoExcel
    It may helps to you.
    Regards,
    Sekhar

  • 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.

  • Extra Line Items Appearing in Invoice

    Dear Experts,
      For certain Invoices extra line items are appearing which is not part of our product.
    Example I have created an invoice for OPCBULK
    but in invoice it is appearing as
    OPCBULK -
    OPC (BULK)H.2
    OPC (BULK)H2
    OPC (BULK)H
    What can be the issue here. Please help. Thanks.

    Hi,
    I think you are creating invoice with reference to delivery document and in delivery document you have maintain batch split so batch split items are appearing in invoice.
    Check delivery
    Kapil

  • SKB1 is displaying unrelated/extra line items.

    Hi,
    I am encountering one problem which is related to KSB1 transaction. It's displaying extra line items which are not related to actual line items . Here is the scenario
    Actual Assessment Cycle contains one segment :
    Segment1 : Sender Cost Center group CG(C1,C2,C3,C4)1---All these cost centers are associated with functional area FA
    Cost element : 942XXXX
    Receiver Cost Center C5,C6,C7,C8----All these cost centers are associated with functional area FA.
    Amount $10
    After executing the assessment cycle when go to KSB1 it's displaying the following line items
    Doc No      Celement         Val in currency        Cost center     partner cost center    Ref Doc No    f unctional area     Posting date
    76942           942XXXX            $10                              C1                         C5                       76939        FA                       09/22/09
    76939           942XXXX           -$10                             C1                         C5                                         FA                       09/22/09
    76939           942XXXX            $0                               C1                          C5                                         FA1                     09/22/09
    76942           942XXXX            $0                               C1                          C5                        76939        FA1                    09/22/09
    I don't know why it's showing the line items which are realted to FA1 and these cost centers ARE assigned to functional area FA not to FA1.Does any one know from where it's pulling this information?Does any one know how it derives the functional area here. I don't know which table has this information(COEP,COEA,CCSS...?) How to fix this?
    I really appreciate your thoughts and input
    Thanks
    Br

    Hi Shekhar,
    What is happening in the system is standard SAP behaviour.. In case you do not want Down Payments to be updated in the system, please follow the steps below:-
    1. Create a new Field status group as a copy of G067 and make it say Z067(Assets field suppressed here) and assign it to Vendor related recon accounts(Spl GL A)
    2. After this, when you create a down payment request in F-47, you will receive an error message F5 378
    3. Go to transaction OBA5, enter work area as F5 and chnage the message no 378 to Warning (W)
    This setting will not generate additional line items.
    Regards,
    Kavita

  • 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

  • System is generated extra line item of G/L while clearing throgh F-44

    Dear Experts ,
    When we processing clearing through F-44 , system is generating one extra line item of G/L ,  due to this system is not allowing for clearing as the message " Posting is only possible with zero balance ; correct document " is served by system.
    Actually while clearing , i am including TDS clearing document (posted via F-54) also .
    please suggest.
    Thanks & Regards
    Shailesh

    Hi
    1. First of all i have given advance to vendor with deducting TDS (@10%) via F-48
    2. after that i have raised one invoice for same vendor with deducting TDS via FB60
    3. vendor TDS clearing via F-54
    4. now when i going for vendor clearing via F-44 with taking reference from above F-54 document
    i got below error :

  • Flash Builder RichTextEditor extra line feeds

    In Flash Builder 4 I am using the RichTextEditor, specifically for the formatting features.  The input is stored in a MySql database; when I retrieve the html text back and shown again in RichTextEditor it has extra line feeds, if I show the text in a Alert box as standard text it has extra line feeds.  Even after removing the extra line feeds and resubmitting to the database it comes back with extra line feeds.  Any suggestions?
    Thanks in advance.

    Hello popster;
    I had the extra line feed problem and now I don't, I don't know what changed
    to fix it, I wish I could tell you what I did (that way I would know for
    next time). 
    I'm sure you know, but just keep updating Flash Builder, I'm telling myself
    maybe this is what fixed it.
    As time allows I will eventually replace the halo RTE with a sparks Text
    Area and make my own format toolbar with sparks components, to follow Adobes
    advice and use a sparks component if available.
    John

  • Extra line after first item in quiz questions

    I just started using Captivate 7.  I made a template with some quiz questions and there is an extra line after the 2nd radio button in the templates for multiple choice and true false questions.  Is that normal ?
    Screen shot.

    I'm experiencing the same problem, also on Captivate 7.
    The alignment is fine on the master slide, but every time I load a multiple choice or true/false question the "B" answer appears like this.
    I've tried it with every theme and the same thing is happening. I've also had the program uninstalled and reinstalled and still the error is there.
    I've searched on different forums, but no one seems to have the answer.

  • Extra line space appearing - Help!

    Hiya,
    Can anyone help.  When in Contribute, I have edited and have deleted a line space using 'shift+enter', it shows as having no line space in Contribute, but when it publishes - lo and behold - a line space appears.
    Can anyone help me resolve this please?
    Thanks,
    Ali

    Try this:  After your edit, hit F5 to redraw the page and be sure that things are as you wanted.  You may discover that there is still an extra line that you have to deal with....

  • 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!

Maybe you are looking for

  • MapIDs - How to make them the same as the Filename.htm?

    Hi All, I'm fairly new to Robohelp, hoping the experts can take it easy on me! We're in the process of converting our old WinHelp projects to Microsoft HTML Help projects. We previously had 10 separate .HLP files for our project, we're hoping to cond

  • How do I transfer a photo from picasa to my documents

    Can anyone tell me how to transfer a picture from picasa to my documents in windows 8.  I am new to windows 8 and I never had any trouble with windows vista This question was solved. View Solution.

  • More "out of memory" problems FCE2

    Hi, Last week I was experiencing "dropped frame" error messages on FCE2. As suggested by Ian R., I printed my project onto video and my "dropped frame" problem immediately went away. But then it came back. Now, along with the "dropped frame" messages

  • Refresh button deleted by mistake

    First, my thanks to Dave Sawyer for answering my help plea so quickly and directing me here to ask my question. My question is how do I get the refresh button (which I accidently deleted) back on Safari? Thank's in advance, Tessie2

  • How can I save photos to iPhoto direct from Photoshop Elements

    Does anyone know how I can save a photo direct to iPhoto after editing in PSE?  Currently I save to the desktop and then "import".  Its a bit of a fiddly way espectially if you  are editing a number of photos direct from iPhoto.  It would be nice to