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: 

on press enter-values in table control gets refreshed

Former Member
0 Kudos

hi

i have make a table control for the fields item(sr no),material,quantity and when i click on the enter button the values entered in it are refreshed or no values shown,kindly guide how to retain the values on the screen fields.

thanks

varun

7 REPLIES 7

Former Member
0 Kudos

Hi,

Can you place the code , so that i can help you.

0 Kudos

ya sure,this is what i am doing i need to validate the fields if theyare fom F4 or not and then check the mistmatch validation

PROCESS BEFORE OUTPUT.

MODULE status_0200.

LOOP AT it_tab INTO wa_tab WITH CONTROL tab.

ENDLOOP

PROCESS AFTER INPUT.

MODULE exit1 AT EXIT-COMMAND.

FIELD: salesdoc MODULE fieldenable.",org,channel,division,material,

FIELD: org MODULE field1. " on chain-request.

FIELD: channel MODULE field2.

FIELD: division MODULE field3.

FIELD: partner MODULE field5.

FIELD: number MODULE field6.

LOOP AT it_tab.

MODULE insert_entry.

FIELD vbap-matnr MODULE validate.

ENDLOOP.

CHAIN.

FIELD:salesdoc,org,channel,division.

MODULE valid1 ON CHAIN-REQUEST.

ENDCHAIN.

chain.

field:partner,number.

module valid2 on chain-request.

endchain.

MODULE user_command_0200.

module insert_entry

wa_tab-itemnum = itemnum.

wa_tab-material = vbap-matnr.

wa_tab-quantity = vbap-kwmeng.

APPEND wa_tab TO it_tab.

CLEAR wa_tab.

ENDMODULE.

validation on material no

MODULE validate INPUT.

SELECT single matnr FROM mara INTO gv_matn WHERE matnr = material.

IF sy-subrc <> 0.

MESSAGE 'Material not from the search help!!!' TYPE 'E'.

ENDIF.

REFRESH it_mvke.

SELECT vkorg vtweg FROM mvke INTO TABLE it_mvke WHERE vkorg = org AND vtweg = channel

AND matnr = vbap-matnr.

IF sy-subrc NE 0.

MESSAGE 'No material exist corresponing to ' TYPE 'E'.

ENDIF.

ENDMODULE. " validate INPUT

.

0 Kudos

gv_matn is defined as type matr in the top include.

thanks varun

0 Kudos

Hi,


MODULE user_command_0200.
module insert_entry
wa_tab-itemnum = itemnum.
wa_tab-material = vbap-matnr.
wa_tab-quantity = vbap-kwmeng.
APPEND wa_tab TO it_tab.
CLEAR wa_tab.
ENDMODULE. 

Here you have implemented module insert_entry but you have not mentioned it is input or output.

like module insert_entry INPUT.

Thanks and Best regards.

Aswath.

0 Kudos

@asawath

module insert_entry input

actually it is called when i clck on the save button

would u be able to help me i have my conatact infor once u click on the name can u send me a test mail so that i can send u the detailed info of what have i done

0 Kudos

Hi,


LOOP AT it_tab INTO wa_tab WITH CONTROL tab.
ENDLOOP.

Here in PBO write a module say populate_data. and move your corresponding entries in your work area to your table.

For example


LOOP AT it_tab INTO wa_tab WITH CONTROL tab.
module populate_data.
ENDLOOP.

.

and in your program.


Module populate_data OUTPUT.
move corresponding wa_tab to LFA1.
endmodule.

Here LFA1 is used just to show you. you use your table work area.

Hope you will find the answer.

Thanks and Best regards.

Aswath.

Former Member
0 Kudos

i got answer