Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Variable in the first page's variable wind is getting overlapped with next

Former Member
0 Likes
426

Hi all,

I have one small problem.In my company there is PO form.At the end of the PO,I have to attach my code.I am getting one small problem,which I and my freinds are unable to resolve it for the past 3 days.I commented my entire code and checked with the below example.Even though I am getting the same wrong data.So,problem is not with my code.

At the end of the PO below is the code.I have one global variable 'X' declared in top include.

****End of existing PO code*********

****Begin of my code*******

X = '1'.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'POSPEC'

WINDOW = 'MAIN'

EXCEPTIONS

ELEMENT = 1

FUNCTION = 2

TYPE = 3

UNOPENED = 4

UNSTARTED = 5

WINDOW = 6

BAD_PAGEFORMAT_FOR_PRINT = 7

SPOOL_ERROR = 8

CODEPAGE = 9

OTHERS = 10.

X = '2'.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'POSPEC'

WINDOW = 'MAIN'

EXCEPTIONS

ELEMENT = 1

FUNCTION = 2

TYPE = 3

UNOPENED = 4

UNSTARTED = 5

WINDOW = 6

BAD_PAGEFORMAT_FOR_PRINT = 7

SPOOL_ERROR = 8

CODEPAGE = 9

OTHERS = 10.

POPEC is text element in main window.It creates a new page POSPEC

/E POSPEC

NEW-PAGE POSPEC

I have one variable window,which has the variable 'W'.Now I have to get 2 new pages(POSPEC) with W as '1' on the begining page and W as '2' on second page.But unfortunately I am getting W as '2' on the two pages.Remember W is on the variable window of the page 'POSPEC'.

Can anyone help me in this regard.It is very very urgent.I have been struggling for the past 3 days.

Thanks,

Balaji

Hi all,

I have one small problem.In my company there is PO form.At the end of the PO,I have to attach my code.I am getting one small problem,which I and my freinds are unable to resolve it for the past 3 days.I commented my entire code and checked with the below example.Even though I am getting the same wrong data.So,problem is not with my code.

At the end of the PO below is the code.I have one global variable 'X' declared in top include.

****End of existing PO code*********

****Begin of my code*******

X = '1'.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'POSPEC'

WINDOW = 'MAIN'

EXCEPTIONS

ELEMENT = 1

FUNCTION = 2

TYPE = 3

UNOPENED = 4

UNSTARTED = 5

WINDOW = 6

BAD_PAGEFORMAT_FOR_PRINT = 7

SPOOL_ERROR = 8

CODEPAGE = 9

OTHERS = 10.

X = '2'.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'POSPEC'

WINDOW = 'MAIN'

EXCEPTIONS

ELEMENT = 1

FUNCTION = 2

TYPE = 3

UNOPENED = 4

UNSTARTED = 5

WINDOW = 6

BAD_PAGEFORMAT_FOR_PRINT = 7

SPOOL_ERROR = 8

CODEPAGE = 9

OTHERS = 10.

POPEC is text element in main window.It creates a new page POSPEC

/E POSPEC

NEW-PAGE POSPEC

I have one variable window,which has the variable 'W'.Now I have to get 2 new pages(POSPEC) with W as '1' on the begining page and W as '2' on second page.But unfortunately I am getting W as '2' on the two pages.Remember W is on the variable window of the page 'POSPEC'.

Can anyone help me in this regard.It is very very urgent.I have been struggling for the past 3 days.

Thanks,

Balaji

2 REPLIES 2
Read only

Former Member
0 Likes
407

Hi Krishna,

If your global variable is named X in the print program, why are you referencing W in your form?

Shouldn't you be referencing X instead?

Apologies if I've misunderstood.

Regards, Andy

Read only

0 Likes
407

sorry it is' X' only.Not 'W'.

Thanks,

Krishna