Skip to Content
0

Label is overlapping in smartform

Dec 08, 2017 at 01:22 PM

65

avatar image
Former Member

I created 8 label in main window using templates but as there are 20 lines in my final table so it is taking 3 pages and on 1st page , 1st label is overlapping with 1st label of 3rd page. and 1st label of 3rd page is coming blank what should i do?

1.png2.png

1.png (33.4 kB)
2.png (23.3 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Naresh Raj Dec 08, 2017 at 02:26 PM
0

Check with page setup & window settings in window level.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Dec 09, 2017 at 09:18 AM
0

issue is resolved @Naresh Raj

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Dec 09, 2017 at 09:25 AM
0
"----To select LR No from VBRK



SELECT VBELN "Material

       FKART

  FROM VBRK

  INTO CORRESPONDING FIELDS OF TABLE IT_VBRK

  WHERE FKART EQ 'LR'

  AND FKSTO <> 'X'

  AND VBELN = S_VBELN.



"----To Select Invoice number from VBRL Table help of LR



SELECT VBELN

       VBELN_VF  "Material

  FROM VBRL

  INTO CORRESPONDING FIELDS OF TABLE IT_VBRL

  FOR ALL ENTRIES IN IT_VBRK

  WHERE VBELN EQ IT_VBRK-VBELN.



"----to get not deleted invoice no's



SELECT

  VBELN

  FKART

  WAERK

  KNUMV

  KUNAG

  FKDAT

  BUKRS

  FROM VBRK

  INTO CORRESPONDING FIELDS OF TABLE IT_VBRK1

  FOR ALL ENTRIES IN IT_VBRL

  WHERE VBELN EQ IT_VBRL-VBELN_VF

  AND FKSTO <> 'X'.



"-----To get invoice line item wise details





  SELECT

    VBELN   "Invoice

    POSNR

    MATNR   "Material

    MATKL

    ERDAT

    WERKS    "Plant

    CHARG

    FKIMG   "Qty

    AUPOS   "SO Line

    AUBEL   "SO No

     FROM VBRP

    INTO CORRESPONDING FIELDS OF TABLE IT_VBRP

    FOR ALL ENTRIES IN IT_VBRL

    WHERE VBELN EQ IT_VBRL-VBELN_VF

      AND CHARG <> ' '

      AND FKIMG <> ' '.



"----to get customer name



SELECT

  KUNNR

  NAME1

  REGIO

  FROM KNA1

  INTO CORRESPONDING FIELDS OF TABLE IT_KNA1

  FOR ALL ENTRIES IN IT_VBRK1

  WHERE KUNNR = IT_VBRK1-KUNAG.



"----to get line item wise details of SO no





SELECT

  VBELN

  POSNR

  MATNR

  KDMAT         "Cust Material No

  POSEX         "PO Line No

  FROM VBAP

  INTO CORRESPONDING FIELDS OF TABLE IT_VBAP

  FOR ALL ENTRIES IN IT_VBRP

  WHERE VBELN = IT_VBRP-AUBEL

  AND MATNR = IT_VBRP-MATNR

  AND POSNR = IT_VBRP-AUPOS .



"----To Select for VBKD(AUBEL)



  SELECT

    VBELN

    POSNR

    BSTKD           "PO No

    FROM VBKD

    INTO CORRESPONDING FIELDS OF TABLE  IT_VBKD

    FOR ALL ENTRIES IN IT_VBRP

    WHERE VBELN EQ IT_VBRP-AUBEL.





   DATA : OBJ LIKE BAPI1003_KEY-OBJECT,

                IT_CLASS TYPE TABLE OF SCLASS,

                IT_OBJECT TYPE  TABLE OF CLOBJDAT,

                wa_object TYPE CLOBJDAT.





LOOP AT IT_VBRP INTO WA_VBRP.



  MOVE WA_VBRP-MATNR TO OBJ.



"---CALL FUNCTION FOR GET FIELD (PURITY)



          CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'

            EXPORTING

              CLASSTYPE         = '001'

              OBJECT            = OBJ

              OBJECTTABLE       = 'MARA'

            TABLES

              T_CLASS           = IT_CLASS

              T_OBJECTDATA      = IT_OBJECT

            EXCEPTIONS

              NO_CLASSIFICATION = 0.

           .

 IF sy-subrc <> 0.

* Implement suitable error handling here

 ENDIF.



 READ TABLE IT_OBJECT INTO WA_OBJECT INDEX 2.

    IF SY-SUBRC = 0.

      WA_VBRP-purity = WA_OBJECT-ausp1.

    ENDIF.



READ TABLE IT_VBAP INTO WA_VBAP

WITH KEY VBELN = WA_VBRP-AUBEL

         POSNR = WA_VBRP-AUPOS.

    IF SY-SUBRC = 0.

    WA_VBRP-KDMAT = WA_VBAP-KDMAT. "PO NO

    WA_VBRP-POSEX = WA_VBAP-POSEX.

    ENDIF.



READ TABLE IT_VBKD INTO WA_VBKD

WITH KEY VBELN = WA_VBRP-AUBEL

         POSNR = WA_VBRP-POSNR. "(ITEM LEVEL)

  IF SY-SUBRC = 0.

    WA_VBRP-BSTKD = WA_VBKD-BSTKD.

  ENDIF.



IF WA_VBRP-BSTKD IS INITIAL.

READ TABLE IT_VBKD INTO WA_VBKD

WITH KEY VBELN = WA_VBRP-AUBEL. "(HEADER LEVEL)



   WA_VBRP-BSTKD = WA_VBKD-BSTKD.

ENDIF.





  MODIFY IT_VBRP FROM WA_VBRP.



 READ TABLE IT_VBRP1 INTO WA_VBRP1 INDEX 1.

         WA_VBRP1-MATNR = WA_VBRP-MATNR.  "Material

         WA_VBRP1-VBELN = WA_VBRP-VBELN.  "Invoice

         WA_VBRP1-PURITY = WA_VBRP-PURITY."Purity

         WA_VBRP1-KDMAT = WA_VBRP-KDMAT.  "Cust Material No

         WA_VBRP1-POSEX = WA_VBRP-POSEX.   "PO Line No

         WA_VBRP1-BSTKD = WA_VBRP-BSTKD.  "PO No

         WA_VBRP1-AUBEL = WA_VBRP-AUBEL.  "SO No

         WA_VBRP1-AUPOS = WA_VBRP-AUPOS.  "SO Line

         WA_VBRP1-FKIMG = WA_VBRP-FKIMG.  "Qty



"---MERGE all Fields for Qty(FKIMG)

COLLECT WA_VBRP1 INTO IT_FINAL.



 CLEAR :WA_VBRP,

       WA_VBRP1.

 ENDLOOP.


-----------------------------------------------------------
loop coding in window.and its applicable for multiple templates
.

SPAN {
font-family: "Courier New";
font-size: 10pt;
color: #000000;
background: #FFFFFF;
}
.L0S31 {
font-style: italic;
color: #808080;
}
.L0S32 {
color: #3399FF;
}
.L0S33 {
color: #4DA619;
}
.L0S52 {
color: #0000FF;
}
.L0S55 {
color: #800080;
}
.L0S70 {
color: #808080;
}

CLEAR : WA_SKIP1.





DESCRIBE TABLE IT_FINAL LINES L1.





IF WA_TABIX <= L1.

  WA_TABIX = WA_TABIX + 1.

*  COUNT1 = WA_TABIX.

   COUNT1 = COUNT1 + 1.

ENDIF.







READ TABLE IT_FINAL INTO WA_FINAL INDEX WA_TABIX.



IF SY-SUBRC = 0.



  WA_SUBRC = 0.

  COUNT = COUNT + 1.

  WA_SKIP = 'X'.



  CHECK COUNT = 8 OR COUNT = 16 OR COUNT = 24 OR

  COUNT = 32 OR COUNT = 40 OR COUNT = 48 OR

  COUNT = 56 OR COUNT = 64. "OR

 " COUNT = 72.



  IF SY-SUBRC = 0.

    WA_SKIP1 = 'X'.

    COUNT1 = 0.



  else.

    WA_SKIP1 = ''.

  ENDIF.


endif.




Share
10 |10000 characters needed characters left characters exceeded