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

Screen painter

Former Member
0 Likes
891

Hi friends,

1. How to Enable / Disable a input field in the Screen Painter, through codes (not through Element list).

2.To have the document number by default, I am selecting the last number from the table (the field type used is MBLNR) and adding 1 to that and displaying the derived value at the time of insert. The code used is as follows.

DATA : WA_NUM TYPE MBLNR.

WHEN 'SAVE'.

SELECT SINGLE MAX( NUM )INTO WA_NUM

FROM ZTable.

ZTable-NUM = WA_NUM + 1.

INSERT ZTable.

CLEAR SCREEN.

ENDCASE.

Eg. The last number in the table is 0000000345.

The deveried number is 346.

In the table, the old values are with zeroes, but the derived value is without zero.

The problem observed is that, subsequently the system is not finding the last number 346, instead it is picking 345.

Why it is not picking 346 as the last number. Even if the table is indexed, the 346 is not coming next to 345, instead, 346 in the first line.

Also let me know, how to add zeroes before to the derived values , ie like '0000000345'.

3. After inserting the record, how to clear the screen. (The clear screen is not working).

Please help to solve these three prolems.

Thanx in advace,

MARK K

6 REPLIES 6
Read only

Former Member
0 Likes
676

Hi Mark,

For your question no. 2:

Please check the data type and length of wa_num.

For getting leading zero's you can use the OVERLAY command. Example : OVERLAY WA_NUM WITH '0000000000'. Provided it is a character field.

Plz reward helpful answers!!

Regards,

Rajeev

Read only

Former Member
0 Likes
676

1. Use--- loop at screen.

........

.......

endloop.

Read only

Former Member
0 Likes
676

hi

1.

loop at screen.

if screen-group4 eq 'test'

screen-active = '0'

endloop.

2.

use function module

CONVERSION_EXIT_ALPHA_INPUT Conversion exit ALPHA, external->internal

CONVERSION_EXIT_ALPHA_OUTPUT Conversion exit ALPHA, internal->external

for inserting 0 at the front ...

3.

clear: wa_num,wa_field2,wa_field3.( ie clear the each of the screen field individually)

reward points if it helps

regards

gunjan

Read only

0 Likes
676

Thanks Gunjan,

The point No.2 is working.

Regards,

Read only

0 Likes
676

The number which is inserted with the derived value, is only a display field. It cannot be edited and also I cannot enter any value in that.

But If I want to view the details of a particular document no., I have to enter the document number in this field. How can I make that field as Input field, when I click the view button.

Pls guide me.

Regards,

Read only

Former Member
0 Likes
676

1. You can enable/disable the field in the screen inside the pbo of the screen.

module input_pbo output.

loop at screen.

if screen-name = 'INPUT'.

screen-input = '0'.

screen-active = '0'.

modify screen.

endif.

endloop.

endmodule. " input_pbo OUTPUT

2. Use CONVERSION_EXIT_ALPHA_INPUT after calculating the document number. YOu wil get it padded with leading zeros.

Regards,

Mark helpful answers