cancel
Showing results for 
Search instead for 
Did you mean: 

SMARTFORMS

nivaskumar2
Explorer
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

nivaskumar2
Explorer
0 Kudos

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

Answers (2)

Answers (2)

nivaskumar2
Explorer
0 Kudos

thanks issue s solved

nivaskumar2
Explorer
0 Kudos

thanks issue s solved