Application Development 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: 

Help in module level programming

Former Member
0 Kudos

Hello All:

I am new to module level programming and I have a screen which has several text controls. When user enters value in one control and hits "enter" it should validate this control and if everything is fine it should automatically tab to next control. Where do I set this tab order? Could someone please help me with this?

Thanks.

Mithun

4 REPLIES 4

Former Member
0 Kudos

Do your validation code in PAI process.

Former Member
0 Kudos

Mithun,

SAP Dialog programs are different. There are Process After Inpu(PAI) and Process before Output(PBO) and also Process On Value(POV). If you think SAP Dialog as with visual basic, .net forms, you will in wrong way. I suggest to learn dialog programming. Can you ask your manager BC410 series documentation. If so, you should start to learn from that documentation.

Best Regards.

Former Member
0 Kudos

Thanks everyone. As advised, I will go through documentation. For now I am trying the code SET cursor <fieldname>. I have field1, I enter some value in it and I hit "Enter". I have a code in PAI to move cursor to next field (field2). This still does not work! The cursor stays in feild1! What am I doing wrong?

Thanks.

Mithin

0 Kudos

Hi,

You have to use CHAIN...ENDCHAIN...constuct

like:

Syntax

CHAIN.

...

ENDCHAIN.

Effect

The statements CHAIN and ENDCHAIN of the dynpro flow logic define processing chains. Between CHAIN and ENDCHAIN, the statements FIELD and MODULE can be executed. The statements between CHAIN and ENDCHAIN form a processing chain. Processing chains cannot be nested. The CHAIN statement can be specified in the event blocks at PAI and PBO , however, in the event block at PBO it has no effect.

A processing chain allows the joint processing of all the screen fields stated between CHAIN and ENDCHAIN after FIELD statements:

The contents of all screen fields combined to a processing chain by the FIELD statements can be checked in the shared conditions ON CHAIN-INPUT and ON CHAIN-REQUEST of the MODULE statement.

A warning or error message in a module called within a processing chain resets all input fields whose screen fields are combined in this processing chain using FIELD statements to ready-for-input. After a user input, the PAI processing resumes at the CHAIN statement at the latest.

Example

Call dialog modules to check input values. The screen fields input1 and input2 are checked in individual dialog modules check_1 and check_2. The screen fields input3 to input5 are checked in a processing chain in a shared dialog module check_chain. Warning or error messages in the dialog modules either make only one input field input1 or input2 ready for input again or all three input fields input3 to input5.

PROCESS AFTER INPUT.

MODULE leave_dynpro AT EXIT-COMMAND.

FIELD input1 MODULE check_1 ON REQUEST.

FIELD input2 MODULE check_2 ON REQUEST.

CHAIN.

FIELD input3.

FIELD input4.

FIELD input5.

MODULE check_chain ON CHAIN-REQUEST.

ENDCHAIN.

MODULE handle_user_command.

Regards,

Renjith Michael.