Skip to Content
0
Former Member
Jan 30, 2007 at 10:42 AM

select queary

16 Views

can u please write joins according to this condition, i will give pooints to us.

the detail data will need to be checked to see if there is any data records to be selected for the internal table. Select a count of records from the ZPNOTEDETL table for the PSPID passed from the calling program.

If the record count is zero then the internal table should be set to initial. A parameter called IS_NOTICES should be set to “N”.

If the record count is greater than zero then:

Set the parameter IS_NOTICES = “Y”.

Select the following data from the ZPNOTEDETL table where the PSPNR = the PSPID passed from the calling program. The PNOTE_NO, PNOTE_TYPE, AWD_TYPE_CODE, PSPNR, BID_NO, PROC_STEP_CODE, PNOTE_STAT, PUB_DATE, PUB_TIME, ORIG_PUB_DATE, ORIG_PUB_TIME, SUB_END_DATE, Concatenate (SUB_END_TIME_HR + “:” + SUB_END_TIME_MM) as SUB_END_TIME, CTR_DESC as PNOTE_DESC, PROC_METH_CODE, CHG_BY_NAME, CRE_BY_NAME, REPT_FROM_DATE, REPT_TO_DATE.

Join the PNOTE_NO for the selected data to the PNOTE_NO in the ZPNOTEHIST table where the PNOTE_HIST_NO = 1 and select the PNOTE_EDIT_DATE as the PNOTE_CRE_DATE.

Join the PNOTE_TYPE for the selected data to the PNOTE_TYPE in the ZPNOTETYPE table and select the PNOTE_TYPE_CODE value.

Join the PNOTE_TYPE_CODE from the ZPNOTETYPE table and the DISP_LANG value to the PNOTE_TYPE_CODE and SPRAS in the ZPNOTETYPEDESC table and select the PNOTE_TYPE_DESC value.

The data should be selected into the PNOTE_LIST internal table.