Using Inner join print through smartforms
ZSTU
ZSTU1
PROGRAM.
REPORT ZAJAY_RP_SF_TASK.
Types: BEGIN OF tY_zstu,
zstu_id TYPE zstu-zstu_id,
zstu_name TYPE zstu-zstu_name,
zstu_dep TYPE zstu-zstu_dep,
zstu_fee TYPE zstu-zstu_fee,
END OF ty_zstu,
BEGIN OF ts_zstu1,
zstu_id TYPE zstu1-zstu_id,
zstu_marks TYPE zstu1-zstu_marks,
END OF ts_zstu1,
begin of ty_final,
zstu_id TYPE zstu-zstu_id,
zstu_name TYPE zstu-zstu_name,
zstu_dep TYPE zstu-zstu_dep,
zstu_fee TYPE zstu-zstu_fee,
zstu_marks TYPE zstu1-zstu_marks,
END OF ty_final.
data: it_final type table of ty_final,
wa_final type ty_final.
PARAMETERS: p_id type zstu-zstu_id.
IF p_id is NOT INITIAL.
select a~zstu_id
a~zstu_name
a~zstu_dep
a~zstu_fee
b~zstu_marks
from zstu as a
LEFT OUTER JOIN zstu1 as b
on a~zstu_id = b~zstu_id
INTO TABLE it_final
where a~zstu_id = p_id.
ENDIF.
CALL FUNCTION '/1BCDWB/SF00000188'
TABLES
it_final = IT_FINAL.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
1. FIRST CREATE STRUCTURE.
- Goto se 11 and select data type and give name and click create its asks to select structure.
2. CREATE TABLE TYPE.
- Goto se 11 and select data type and give name and click create its asks to select table type.
- Line type is structure name.
3. CREATE SMARTFORM.
- Goto smartforms transaction code and give form and and click create.
* After that create table and give detials.
* Execute smartform.
* Call function module in report program and Execute.
Input
Output
Comments
Post a Comment