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

selection-screen

Former Member
0 Likes
762

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
Read only

Former Member
0 Likes
738

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

Read only

Former Member
0 Likes
738

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...

Read only

Former Member
0 Likes
738

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.

Read only

former_member497886
Participant
0 Likes
738

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.

Read only

Former Member
0 Likes
738

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

Read only

Former Member
0 Likes
738

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).

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
738

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.

Read only

Former Member
0 Likes
738

fgfdg

Read only

Former Member
0 Likes
738

fgfdg