Skip to Content

SMARTFORMS

hi ,

in a smartform,i had pgm lines which contains all perform stmts.and all form stmts are in include.i m not getting the o/p s emplty.the code i written as belows,

in pgm line :

PERFORM GET_ODO_NUMBER IN PROGRAM Z_HU_DES_INCLUDE

USING WA_HUHDR-LGNUM WA_HUHDR-HUIDENT.

in include :

FORM GET_ODO_NUMBER USING WA_HUHDR_LGNUM WA_HUHDR_HUIDENT .

DATA : LT_DATA_PARENT TYPE /SCWM/TT_HUHDR_MON, "INTERNAL TABLE HANDLING UNIT HEADER DATA FOR MONITOR

LWA_DATA_PARENT TYPE /SCWM/S_HUHDR_MON, "WORK AREA HANDLING UNIT HEADER DATA FOR MONITOR

LT_DATA TYPE /SCWM/TT_HUITM_MON, "INTERNAL TABLE HANDLING UNIT HEADER DATA FOR MONITOR

LWA_DATA TYPE /SCWM/S_HUITM_MON, "WORK AREA HANDLING UNIT HEADER DATA FOR MONITOR

LV_COUNT TYPE I, "TOTAL NO PF LINES

LV_DSTGRP TYPE /SCWM/DE_DSTGRP. "CONSOLIDATIOPN GROUP

move wa_huhdr_lgnum to lwa_data_parent-lgnum.

move wa_huhdr_huident to lwa_data_parent-huident.

append lwa_data_parent to lt_data_parent.

CALL FUNCTION '/SCWM/HUITM_OVERVIEW_MON'

EXPORTING

IV_LGNUM = WA_HUHDR_LGNUM

IV_MODE = '2'

IT_DATA_PARENT = LT_DATA_PARENT

IMPORTING

ET_DATA = lt_data.

read table lt_data into lwa_data index 1.

move lwa_data-docno TO GV_ODO_DOCNO.

MOVE LWA_DATA-ITMNO TO GV_ODO_ITMNO.

MOVE LWA_DATA-DOCCAT TO GV_DOCCAT.

SELECT DOCID ROUTE_ID FROM /SCDL/DB_PROCH_O INTO (GV_DOCID , GV_ROUTE_ID)

WHERE DOCNO = GV_ODO_DOCNO AND DOCCAT = GV_DOCCAT.

ENDSELECT.

SELECT

ITEMID

INTO GV_ITEMID

FROM /SCDL/DB_PROCI_O

WHERE

DOCNO EQ GV_ODO_DOCNO AND

ITEMNO EQ GV_ODO_ITMNO AND

DOCCAT EQ GV_DOCCAT.

ENDSELECT.

DESCRIBE TABLE LT_DATA LINES LV_COUNT.

  • CHECK VALUE TO TOTAL NO OF LINE IN INTERNAL TABLE

IF LV_COUNT = 1.

read table lt_data into lwa_data WITH KEY DSTGRP = LWA_DATA-DSTGRP.

MOVE LWA_DATA-DSTGRP TO GV_DSTGRP.

ELSE.

READ TABLE LT_DATA INTO LWA_DATA INDEX 1.

MOVE LWA_DATA-DSTGRP TO LV_DSTGRP.

LOOP AT LT_DATA INTO LWA_DATA.

IF LWA_DATA-DSTGRP = LV_DSTGRP.

MOVE LWA_DATA-DSTGRP TO GV_DSTGRP.

ELSE.

WRITE : 'MIXED'.

ENDIF.

ENDLOOP.

ENDIF.

ENDFORM. "GET_ODO_NUMBER

pls let me know my code is correct.if it s correct where should i check

urgent

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 15, 2006 at 02:30 PM

    Nivas,

    It will be difficult to say if your code is right / wrong as we cannot see the smart form.

    1. Is your SMART Form getting activated without any errors?

    2. IF yes, place a breal point in the program lines (BREAK-POINT) and execute the smart form.

    3. Check for the variables to see if they are getting the values as per your expectation.

    That should tell you where the problem is.

    Regards,

    Ravi

    Note - Please mark all the helpful answers

    Add a comment
    10|10000 characters needed characters exceeded

    • > Nivas,

      >

      > It will be difficult to say if your code is right /

      > wrong as we cannot see the smart form.

      >

      > 1. Is your SMART Form getting activated without any

      > errors?

      >

      > 2. IF yes, place a breal point in the program lines

      > (BREAK-POINT) and execute the smart form.

      >

      > 3. Check for the variables to see if they are getting

      > the values as per your expectation.

      >

      > That should tell you where the problem is.

      >

      > Regards,

      > Ravi

      > Note - Please mark all the helpful answers

      i tried before wht your info.but the problem is,when i hard coded the break-point.it s not comming debug.after i removed the loop it s comming to debugging mode.

      so is that the loop is wrong.or wht did for break-point is wrong .give me your valuble inputs.

  • Posted on Jan 09, 2007 at 08:09 AM

    thanks issue s solved

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 09, 2007 at 08:10 AM

    thanks issue s solved

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.