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: 

selection-screen

Former Member
0 Kudos

in my selection screen i have 3 feilds-- billing doc no(vbrk-vbeln), customer no(kna1-kunnr) and customer name(kna1-name1).

i have made a ztable with this 3 feilds. now whenever user executes the report after giving values in the screen, the

feilds in my ztable should be updated with the user entered bill doc no, custno and name.how to do this..

9 REPLIES 9

Former Member
0 Kudos

Hi narayan,

Declare one internal table with 3 fields and retrieve selection screen fields values to internal table and update with Ztable with Internal Table , if u need code ask me.

Regards

Jana

Edited by: Janardhan Reddy on Sep 11, 2008 11:50 AM

Former Member
0 Kudos

hi...

you can fetch the slection screens value in a varialbe and upadte your table using rthat varialbe...

that should be one of the solution...

Former Member
0 Kudos

Hi,

What is your table's primary key and if just update needed you have to specify the key field as obligatory and update then.

I assume vbeln is your key, so:

Update ztable set kunnr = p_kunnr name1 = p_name1

where vbeln = p_vbeln.

Try this.It will work.

deniz.

former_member497886
Participant
0 Kudos

Hi,

What u can do is , save the values entered by the user in internal table fields.

From internal table insert it into Ztable.

All the best.

Mohammadi.

Former Member
0 Kudos

Hi,

First of all declare one internal table with 3 fields that you need and retrieve selection screen fields values to internal table and update with Ztable with Internal Table. in your case you need to either use JOIN or FOR ALL ENTRIES.. as 2 tables are involved

example:

select avbeln bkunnr b~name1

from vbrk as a INNER JOIN kna1 as b

ON .....

into table itab1

where a~vbeln = p_vblen

and b~kunnr = p_kunnr

and b_name1 = p_name1.

if sy0subrc = 0.

" then use update command to update the ztable .

Update ztable from table itab1.

IF sy-subrc EQ 0.

COMMIT WORK.

l_error = 'X1'.

ELSE.

l_error = 'X2'.

CLEAR l_error.

ROLLBACK WORK.

ENDIF.

endif.

its not the whole code you need to find common fiels in tables vbrk and kna1 that we need to join.

thanx.

Edited by: Dhanashri Pawar on Sep 11, 2008 8:40 AM

Former Member
0 Kudos

in my selection screen i have 3 feilds-- billing doc no(vbrk-vbeln), customer no(kna1-kunnr) and customer name(kna1-name1).

i have made a ztable with this 3 feilds. now whenever user executes the report after giving values in the screen, the

feilds in my ztable should be updated with the user entered bill doc no, custno and name.how to do this..

Hi

Store the values from the selection screen to a structure of type ZTABLE. (here structure because i think only one set of values is possible from ur selection screen...if u have multiple then store it in a internal table)

Enque/deque your ZTABLE. In between these functions modify ur ztable using the structure (if it is not initial).

kesavadas_thekkillath
Active Contributor
0 Kudos

Move pa_matnr to ztable-matnr.

assuming the ztable has a field matnr.

insert ztable.

if sy-subrc = 0.

commit work.

endif.

if more fields move it to table header and do insert.

Former Member
0 Kudos

fgfdg

Former Member
0 Kudos

fgfdg