Extra lines in AS-code?

When I create a widget from Captivate (File - New - Widget in Flash...) it produces a AS(2)-code. In this code I see the next lines:
if(wm == undefined)
wm = widgetMode;
if(wm == undefined)
wm = 'Stage';
What's the function of the last two lines (the variable wm is set in the first lines).
 

If widgetmode is undefined, then wm will still be undefined after the first if statement. The second if statement checks for that case and sets the value to 'Stage'.

Similar Messages

  • Fix for extra line spacing in code on publish

    Hi Everyone
    Here is a fix for the issue where on publishing using Contribute (CS3 / CS4) extra line spacing is added into the HTML code on publish.  Everytime you publish using Contribute extra line spacing is added between the lines of coding destroying the formatting over time.
    (See attached PDF document for the complete how to step-by-step fix.)
    The issue lies in the line break type defined in Adobe Contribute settings.  Where the web server type, the website is hosted on Unix / Windows, is different from the line break type defined in Contribute's settings under...
    Users & Roles > Editing > Line break Type
    For example:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Website Tile</title>
    <meta name="keywords" content="Keywords here" />
    <meta name="description" content="Description here" />
    On publish becomes:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Website Tile</title>
    <meta name="keywords" content="Keywords here" />
    <meta name="description" content="Description here" />
    (dots are used just to space the text in the forum thread post, they represent blank lines between the lines of code)

    It sounds like you are carrying over a desktop setting that I dont think is editable in iPad pages. It is the before and after spacing around paragraphs. I have been using iPad versions for months now and cant think of the desktop wording in the inspector.
    Open back up in Dekstop pages and see if you can find that setting and reset it to a lower value, or delete the value and resend to iPad.
    Jason

  • Extra empty lines in java code

    Hello
    I am experiencing a strange behaviour of SJSC 2.1 (Windows XP) after insttalling the last performance fix
    When manipulating components in a page, the .java file gets corrupted. An extra empty line is including after each line. Code still compiles but obviously the code becomes unreadable. This happens if you add a new component to the page o double-click in a component (to edit the action or valuechange methods
    Editing-only (in the java window) works ok.
    An additional problem found. International characters are not handled properly anymore by the design editor (or the properties window). Changes to them are translated to question marks in the JSP. Only wokaround is to directly edit the JSP
    All this happened just after installing the hotfix.

    I had the same problem, and pointed out to the Creator, who were able to reproduce it. So, they know about it now.
    A very undesirable effect of this problem is that as the Java files grows in size, JSC becomes very slow, and can sometimes hang.
    Also, I've noticed that this problem happens only with JSC1 created pages, not with JSC2 pages.
    My workaround is the following:
    1). Download and install the text editor - TextPad
    2. Go to the folder containing the java files with the extra lines, select them all, and open with TextPad.
    3). Fix the extra line problem with the following regex:
    ^[[:space:]]*\n
    The above regular expression, will take care of the extra lines.
    4). Do a search and replace all for all active documents, and save and close.
    But obviously, this is a serious problem, and I urge the Creator team to please fix it at the earliest, so as not to cause further confusion and loss of time and effort!
    Regards
    Haroon

  • Extra blank lines in source code

    I have built a website in Dreamweaver CS4 and have a client editing pages in Contribute CS5. Both of us are working on Windows 7, and the site is hosted on Linux. When she makes edits to the page, something is introducing a GAZILLION blank lines in the source code. A typical page for this site is about 380 lines of code. The problem page is now more than 310,000 lines code with 100-200 blank lines between every "real" line of code. What the...?!
    I need to know how to stop this and how to remove the blank lines from the source code using Dreamweaver.
    The page in question lives here: http://www.alexandercitychamber.com/member-category.html
    HELP!!!
    Jeff

    Hello, Diane -
    We've got two separate issues here, but I think we have the solution to both.
    1. How to stop Contribute from adding blank lines in the code, and
    2. How to clean up a GAZILLION lines of blank code in a document.
    First, Number 1. I assume you're working in Dreamweaver. If not, I'm not sure how to guide you. But, when you define a Contribute Site, there is an area to specify administrative roles and permissions. Under each Role, at the bottom, you will see a popup for what kind of server the site is hosted on. The default is Windows. I had to change this to Unix (Linux) to match the hosting of our problem site. Find out what platform your host is using. You will have to specify this under each admistrative Role. After doing this, I had the client make some edits, then I opened the files in Dreamweaver. No new blank lines. I admit, I still have my fingers crossed somewhat.
    Okay, now how to clean up your source code and remove blank lines. A developer friend found this on some forum I had not seen. I don't know where, but I am grateful to the person who wrote it. It didn't get all the blank lines in my files, but I think some of the others, which I removed manually, were probably from the client pasting content in from Word. Here's what to do:
    1. Open the file in Dreamweaver
    2. Click CTRL + F, or go to EDIT > FIND AND REPLACE
    3. Select "Current document" in "Find In" (You can also select the folder if you have multiple files.
    4. Search in "Source Code"
    5. Check the box labeled "Use regular expression"
    6. Type "[\r\n]{2,}" (without quotes) in "Find"
    7. Type "\n" (without quotes) in "Replace"
    8. Press "Replace All"
    The operation chugged for a few minutes with my 301,000-line document. Yours may a take a little longer, but it did work. Good luck!
    Jeff
    [email protected]

  • 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

  • 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

  • Dreamweaver has added thousands of blank lines to my code

    I installed creative cloud and dreamweaver - I edited a few PHP  / HTML  / javascript  files on my server - now dreamweaver had added thousands of blank lines to my code. It will take days to clean them out and I can't seem to find a "find and replace" or "regular expression" to remove these... first of all... THANKS SO MUCH FOR GIVING ME THIS HEADACHE... and now.... HOW THE FRIG DO I GET RID OF THESE???
    It is dreamweaver that did it...
    I just tested and proved it.
    Took a well formatted html doc....
    Edited it (remotely) with two different software -
    Then connected Dreamweaver Edited it again... and WHAMO!
    11,0000 lines of new blank lines.
    Dreamweaver is for sure confusing something as a new line.
    Undoubted there is a reason for this... but it is for sure Dreamweaver the culprit for actuating it.
    The files are of course downloaded as temp files - edited - and then uploaded at save....
    So my tests are true and consistent.
    Three different editing software all performing the exact same steps.
    Yet - Dreamweaver adds thousands of blank lines.
    It looks to me as though it is adding the line where there was a return. Somehow interpreting it as 2 line returns.
    Whatever is happening - is happening inside dreamweaver, while using its "files connect to remote server" function.
    These are live websites with custom PHP, PHP frameworks, MySQL calls, Javascript and...
    I have been using the "Switch Design View To Live View" to test the PHP changes I make right in DreamWeaver.in Dreamweaver, how to prevent it, or how to get rid of the 10's of thousands of returns once they have been added.
    If anyone has any actual answers as to why this is happening …. Please let me know.
    I am not interested in assumptions from the many here who tend to waste a lot of space and time convoluting these forms.
    This is a real problem and has already been proven to be actuated by Dreamweaver... So please... Only answers that may help sort out why or how this is happening within Dreamweaver.
    Thank you.
    Regards,
    Ken

    Ken, I just posted a potential solution.
    Here is my post:
    For people having issues with DW (or any other ftp app) adding extra blank lines: changing the ftp mode to BINARY probably solves this behaviour. It happened once to me when using Filezilla ftp.
    Dreamweaver automatically uses ASCII to transfer readable text based files (like html and php). To change this transfer mode to BINARY, open FTPExtensionMap.txt (WIndows in AppData\Roaming\Adobe\Dreamweaver CS6\en_US\Configuration) and edit that file in a text editor.
    Then change the appropriate mappings.
    Hope that helps fix the problem.It's a known problem in certain cases, though I haven't experienced it a lot (just once a few years ago in Filezilla, actually). It has to do with how a Windows system and certain Linux systems might interpret CR LF and LF line endings.
    Read more here: https://wiki.filezilla-project.org/Data_Type

  • Extra indent in source code created in dreamweaver

    When I open a html file created in dreamweaver with a browser
    and view source code from the browser, there are extra indents
    added to the source code.
    For example, if I write a line of code in dreamweaver
    [tab]<p>one indent</p>
    it becomes
    [tab][tab]<p>one indent</p> in a browser
    Is there a setting in dreamweaver to make this from
    happening?

    Hello, Diane -
    We've got two separate issues here, but I think we have the solution to both.
    1. How to stop Contribute from adding blank lines in the code, and
    2. How to clean up a GAZILLION lines of blank code in a document.
    First, Number 1. I assume you're working in Dreamweaver. If not, I'm not sure how to guide you. But, when you define a Contribute Site, there is an area to specify administrative roles and permissions. Under each Role, at the bottom, you will see a popup for what kind of server the site is hosted on. The default is Windows. I had to change this to Unix (Linux) to match the hosting of our problem site. Find out what platform your host is using. You will have to specify this under each admistrative Role. After doing this, I had the client make some edits, then I opened the files in Dreamweaver. No new blank lines. I admit, I still have my fingers crossed somewhat.
    Okay, now how to clean up your source code and remove blank lines. A developer friend found this on some forum I had not seen. I don't know where, but I am grateful to the person who wrote it. It didn't get all the blank lines in my files, but I think some of the others, which I removed manually, were probably from the client pasting content in from Word. Here's what to do:
    1. Open the file in Dreamweaver
    2. Click CTRL + F, or go to EDIT > FIND AND REPLACE
    3. Select "Current document" in "Find In" (You can also select the folder if you have multiple files.
    4. Search in "Source Code"
    5. Check the box labeled "Use regular expression"
    6. Type "[\r\n]{2,}" (without quotes) in "Find"
    7. Type "\n" (without quotes) in "Replace"
    8. Press "Replace All"
    The operation chugged for a few minutes with my 301,000-line document. Yours may a take a little longer, but it did work. Good luck!
    Jeff
    [email protected]

  • 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

  • How can I print the "number lines" with the code in Visual Studio?

    How can I print the "number lines" with the code in Visual Studio?

    Hi BillionaireMan,
    What about your issue now?
    If you have resolved it, you can share the solution here, which will be beneficial for other members with the same issue.
    If you did not, please tell us more information,we will try my best to help you.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • 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

  • 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

Maybe you are looking for

  • Can't use my Creative in Design CS6 suite or Acrobat xi error 16

    Hello, cant use my CS6 Suite or any adobe product (Own all products not on cloud) since upgrading to Maverics. Tried Fix http://helpx.adobe.com/x-productkb/policy-pricing/configuration-error-cs5.html Does nothing as all the other posters stated. Trie

  • [REPORT] : Help to arrange the row & column.

    Dearest my Collegues. I'm facing difficult in arranging of report. Straight to the point: I've data in 1 ODS like this. Key1     Key2      Flag    Supplier    K1           1            C        Nike K1           2            C        Reebok K1       

  • Does the forms developed in LiveCycle Designer ES -2 support i-pad ?

    Hello All, I have to develop a form which has 4-5 pages. The form should support Windows as well as i-pad also. Could anybody throw some light on my query or suggest some link ? I have never worked in Mac OS. So I am a bit skeptical. Thanks. Bibhu.

  • Preventing Preview from saving downloaded PDFs

    I love Preview in many ways, but one way I miss Adobe (or is it Windows...?) is that the PDFs were saved as temp files and deleted when closed. This meant if I wanted a copy, I manually saved it. With Preview, my desktop can quickly fill up with unwa

  • Cannot read email

    Just updated to the new 4.0 on my 3.0 system on Saturday. On Monday I noticed I can't read my email. The email will download and I can read the first 2 lines (or 3, 4, 5 lines if I change it in my settings), but when I click on the actual email to vi