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

Condition on fields in Database table.

swapnil_rane
Explorer
0 Likes
428

Hi Experts,

I need to create new ZTABLE with 5 fields :

1. Sales Organisation VKORG

2. Distib. channel SPART

3. Country LAND1

4. Customet KUNNR

5. Price char1

6. Net price char1.

First 2 fields should be Primary key.

Condition on remaining fields is that :

1. For each record Either Country or Customer should be maintained.

2. For each record Either Price or Net price should be maintained.

Kindly guide.

Moderator message : Spec dumping not allowed. Read forum rules before posting. Thread locked.

Edited by: Vinod Kumar on Jun 29, 2011 3:41 PM

2 REPLIES 2
Read only

Former Member
0 Likes
400

Hi,

You need to create an event in TMG.

in this event write code to check if teh desired fields are populate or not.

if not then throw your desired error message.

For how to create events , check following link :

[http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/8129f164-0a01-0010-2a8e-8765287250fc?quicklink=index&overridelayout=true]

Read only

Former Member
0 Likes
400

Hi,

You should do the things in Table maintenance generator events only. select the event as 05 and do the code



if ztable-LAND1 is initial and ztable-KUNNR is initial.
message
ENDIF
if ztable-Price is initial and ztable-Net price is initial.
message
ENDIF

Regards,

Dhina..