Skip to Content
0
Former Member
Feb 01, 2010 at 07:48 AM

Saving the multiple records in the ztable

35 Views

Hi Experts,

I am using the htmlb, in onInputprocessing I am writing the code to save the inputed values , there are several inputs to save in the ztable, how can i achieve it ?

This is the code iam repeating for each field..

layout code:

<htmlb:label text = "Registration request no:" for = "ZZREGREQNO" />

<htmlb:inputField id = "ZZREGREQNO"

type = "string"

size = "30"

value = "<%=ZZREGREQNO%>"

design = "STANDARD" /> <BR>

<htmlb:label text="address1"........

<htmlb:label text="address2"........

OninputProcessing. event code.

if w_event->id eq 'save'.

call method cl_htmlb_manager=>get_data

EXPORTING

request = runtime->server->request

name = 'inputfield'

id = 'ZZREGREQNO' ""Id of an inputed field

RECEIVING

data = w_object.

w_inputfield ?= w_object.

w_in_value = w_inputfield->value.

w_ZZREGREQNO = w_in_value.

clear: w_object,w_in_field,w_in_value.

call method cl_htmlb_manager=>get_data for w_address1.

call method cl_htmlb_manager=>get_data for w_address2.

t_final-ZZREGREQNO = w_ZZREGREQNO.

t_final-ZZADDR1 = w_address1.

t_final-ZZADDR2 = w_address2.

INSERT ZSRM_VENDOR_REG from t_final.

I want to know how can i write one statement to save the inputed fields using the above code? without repeating the above event code for each input?