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

Problem in table control

Former Member
0 Likes
641

Hi,

I have developed a table-control .

I have certain errors captured in the chain-enchain statement of the program.

When I click on a particular button on the screen,the chain-endchain block is getting skipped and the module user-command is being called .

Due to this,the errors that are captured in the chain-endchain block are not getting displayed .

Please can someone help me out with this.

Regards,

Sushanth H.S.

4 REPLIES 4
Read only

Former Member
0 Likes
544

Hello,

The field modules are only processed when some event occurs in the fields used by the command. The only modules that are always executed are the modules called with the MODULE command (without FIELD or others commands like ON EXIT-COMMAND).

See demo program DEMO_DYNPRO_STRINGS for data transfer betwen screen .

For subscreens see demo program DEMO_DYNPRO_SUBSCREENS .

Regards,

Read only

Former Member
0 Likes
544

hey....

i wud suggest u a rather simple way to capture the errors in the chain end chain....

first i suppose u dont know wen the errors come... i would suggest you to use breakpoints within the chain end chain and den check wat errors come. To analys the code step by step, use /h in the command line before clicking on the screen... this wil take you to the first line of code that gets executed once u press any button. Moreover, it is obvious that the user command wil get executed as it is insidde the PAI module. So in order to chk errors in the chain end chian, try putting the code in a module and cal that module before the user command in the PAI.

hope this helps, do reward anyways...;)

and do get back if the trouble persists. wil try to help u out.

Read only

Former Member
0 Likes
544

Hi Sushanth,

Here is one option for you if the module inside chain endchain is being skipped as mentioned ....

in the chain ..endchain....

add all your messages to an internal table..in addition to the existing process of giving messages in the module inside chain..endchain

When the user presses the button....

it will be captured in the sy-ucomm..

so write

Case sy-ucomm.

when 'XXXX' . "XXXX = some function code of a button

if the internal table[] is not initial.

loop at internal table into work area.

  • so in the work area you have the message

message 'The entry is wrong' type 'S'.

clear sy-ucomm.

exit.

endloop.

else. "if internal table is initial means no error

write code for action of the button here

endif.

*so what happens is that

(1)you will show your first message if there are mutiple messages

(2) then clear the sy-ucomm so that user has to go ansd correct the error

(3)"exit" so that you don't overwrite the current message displayed on the screen with the next....show the messages to him one by one..

you can decide what the structure of the internal table

because messages can be given directly,using message classes,using text-elements for description..etc

The solution is workable and has been tried before....

Reward if it helps ....

Regards

Byju

Read only

Former Member
0 Likes
544

There may be some mistake in your chan- endchain part.

use like this.

chain.

field <field1>.

field <field2>.

module check_chain on chain-request.

where check_chain is the module where u have to write ur validations.