Help me with procedure logic.
here is my procudure
PROCEDURE Negative_Input IS
nCnt number(10);
WS_VALID_USER_ID Varchar2(3);
BEGIN
If nvl(:MISC_PAYMENT_VIEW_SINGLE.DD_TRADD_CASH,' ')<0 or
nvl(:MISC_PAYMENT_VIEW_SINGLE.DD_TRADD_Check,' ')<0 or
nvl(:MISC_PAYMENT_VIEW_SINGLE.DD_TRADD_EFT,' ')<0 or
nvl(:MISC_PAYMENT_VIEW_SINGLE.DD_TRADD_TOTAL,' ')<0 then
SELECT COUNT(*) INTO nCnt
FROM ap_cashier_rev_auth
where cashier_id = USER;
end if;
IF (nCnt > 0) THEN
WS_VALID_USER_ID := 'YES';
ELSE
WS_VALID_USER_ID := 'NO';
END IF;
IF nvl(WS_VALID_USER_ID,' ') = 'NO' THEN
display_MESSAGE(USER || ' is not authorized to enter nagative values.');
SET_APPLICATION_PROPERTY(CURSOR_STYLE,'DEFAULT');
RAISE FORM_TRIGGER_FAILURE;
END IF;
END;
Cashier's who are in ap_cashier_rev_auth can enter negative values. this part works fine. But none of the cashier's can enter any non negative values >0.
what i am trying to do is .. restrict cashier's to enter negative value into the application. Only few cashier's those who are in the table can enter negative value. There are some other cashier's also .
But now it won't let cashier's not in the table enter negative and non negative values. i need help.
Frank Kulash wrote:
pl/sql baby wrote:
i got the answer.
i put the end if in wornfg pllace.That would be hard to miss if you formatted your code.Or if compilers existed :)
Similar Messages
-
Can you please help me with validation logic for Events in Table maintenance generator
Can you please help me with validation logic for Events in Table maintenance generator,i.e if i enter record in 1st internal table then automatically 2nd internal table should be updated.
Hi Glen Anthony,
Thanks for replay,
I used foreign key relationship between those 2 internal tables....
I used event 05: When creating a new entry. I want to know the custom logic by which my 2nd Internal table gets automatically updated when i update my 1st Internal table
Thanks Glen. -
Please Help me with this Logic.....
Seniors , Please Help me with this Requirment
BUKRS _____________________
GJAHR ____________________
LIFNR _____________________
MONAT _____________________
LIFNR NAME1 GSBER GJAHR HBAL SBAL ACCUMBAL
1001 ABB BUSS1 2005 300 00
ABB BUSS1 2005 00 100
300 100 (300-100)=200
ABB BUSS1 2006 200 00
ABB BUSS1 2006 200 00
400 00 (400-00)+ 200 =
600
ABB BUSS2 2005 300 00
ABB BUSS2 2005 00 100
300 100 ( 300-100) =200
ABB BUSS2 2006 400 00
ABB BUSS2 2006 00 100
400 100 (400-100)+200 =
500 ****************************************************************************
1400 300 (1400-300) **********************************************************************************************************
Same for the Next Vendor also...
This is the report for this Requirment i am working on....Please Help me in the Logic..How to Go on with it....
*& Report ZVENDOR_RECONCILLATION
REPORT ZVENDOR_RECONCILLATION.
TABLES : BSAK , BSIK , LFC1 , LFC3 , LFA1.
*ALV
TYPE-POOLS: SLIS.
*TYPE-POOLS icon.
DATA: It_SORT TYPE SLIS_T_SORTINFO_ALV ."WITH HEADER LINE.
DATA: TOP TYPE slis_t_listheader,
END TYPE slis_t_listheader,
EVENTS TYPE slis_t_event.
DATA : T_KEY TYPE SLIS_KEYINFO_ALV.
DATA : FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
LAYOUT TYPE SLIS_LAYOUT_ALV OCCURS 1 WITH HEADER LINE ,
LCAT TYPE SLIS_FIELDCAT_ALV.
*INTERNAL TABLE
DATA: BEGIN OF sd_bsak,
bukrs TYPE bsak-bukrs,
lifnr TYPE bsak-lifnr,
umsks TYPE bsak-umsks,
umskz TYPE bsak-umskz,
augdt TYPE bsak-augdt,
augbl TYPE bsak-augbl,
zuonr TYPE bsak-zuonr,
gjahr TYPE bsak-gjahr,
belnr TYPE bsak-belnr,
buzei TYPE bsak-buzei,
budat TYPE bsak-budat,
bldat TYPE bsak-bldat,
xblnr TYPE bsak-xblnr,
blart TYPE bsak-blart,
monat TYPE bsak-monat,
bschl TYPE bsak-bschl,
zumsk TYPE bsak-zumsk,
shkzg TYPE bsak-shkzg,
gsber TYPE bsak-gsber,
dmbtr TYPE bsak-dmbtr,
wrbtr TYPE bsak-wrbtr,
sgtxt TYPE bsak-sgtxt,
saknr TYPE bsak-saknr,
hkont TYPE bsak-hkont,
END OF sd_bsak.
DATA: BEGIN OF sd_bsik,
bukrs TYPE bsik-bukrs,
lifnr TYPE bsik-lifnr,
umsks TYPE bsik-umsks,
umskz TYPE bsik-umskz,
augdt TYPE bsik-augdt,
augbl TYPE bsik-augbl,
zuonr TYPE bsik-zuonr,
gjahr TYPE bsik-gjahr,
belnr TYPE bsik-belnr,
buzei TYPE bsik-buzei,
budat TYPE bsik-budat,
bldat TYPE bsik-bldat,
xblnr TYPE bsik-xblnr,
blart TYPE bsik-blart,
monat TYPE bsik-monat,
bschl TYPE bsik-bschl,
zumsk TYPE bsik-zumsk,
shkzg TYPE bsik-shkzg,
gsber TYPE bsik-gsber,
dmbtr TYPE bsik-dmbtr,
wrbtr TYPE bsik-wrbtr,
sgtxt TYPE bsik-sgtxt,
saknr TYPE bsik-saknr,
hkont TYPE bsik-hkont,
zlsch TYPE bsik-zlsch,
END OF sd_bsik.
DATA: BEGIN OF it_lfa1,
lifnr TYPE lfa1-lifnr,
name1 TYPE lfa1-name1,
END OF it_lfa1.
*FINAL INTERNAL TABLE DECLARATION
DATA: BEGIN OF IT_FINAL,
lifnr TYPE bsak-lifnr,
gsber TYPE bsak-gsber,
bukrs TYPE bsak-bukrs,
umsks TYPE bsak-umsks,
umskz TYPE bsak-umskz,
augdt TYPE bsak-augdt,
augbl TYPE bsak-augbl,
zuonr TYPE bsak-zuonr,
gjahr TYPE bsak-gjahr,
belnr TYPE bsak-belnr,
buzei TYPE bsak-buzei,
budat TYPE bsak-budat,
bldat TYPE bsak-bldat,
xblnr TYPE bsak-xblnr,
blart TYPE bsak-blart,
monat TYPE bsak-monat,
bschl TYPE bsak-bschl,
zumsk TYPE bsak-zumsk,
shkzg TYPE bsak-shkzg,
gsber TYPE bsak-gsber,
dmbtr TYPE bsak-dmbtr,
wrbtr TYPE bsak-wrbtr,
sgtxt TYPE bsak-sgtxt,
saknr TYPE bsak-saknr,
hkont TYPE bsak-hkont,
DMBTR_S TYPE BSAK-DMBTR,
DMBTR_H TYPE BSAK-DMBTR,
DS TYPE P DECIMALS 2,
DH TYPE P DECIMALS 2,
SUB TYPE P DECIMALS 2,
ADD TYPE P DECIMALS 2,
BAL TYPE P DECIMALS 2,
lifnr TYPE bsik-lifnr,
umsks TYPE bsik-umsks,
umskz TYPE bsik-umskz,
augdt TYPE bsik-augdt,
augbl TYPE bsik-augbl,
zuonr TYPE bsik-zuonr,
gjahr TYPE bsik-gjahr,
belnr TYPE bsik-belnr,
buzei TYPE bsik-buzei,
budat TYPE bsik-budat,
bldat TYPE bsik-bldat,
xblnr TYPE bsik-xblnr,
blart TYPE bsik-blart,
monat TYPE bsik-monat,
bschl TYPE bsik-bschl,
zumsk TYPE bsik-zumsk,
shkzg TYPE bsik-shkzg,
gsber TYPE bsik-gsber,
dmbtr TYPE bsik-dmbtr,
wrbtr TYPE bsik-wrbtr,
sgtxt TYPE bsik-sgtxt,
saknr TYPE bsik-saknr,
hkont TYPE bsik-hkont,
zlsch TYPE bsik-zlsch,
lifnr TYPE lfa1-lifnr,
name1 TYPE lfa1-name1,
END OF IT_FINAL.
DATA: BEGIN OF SD_FINAL,
gsber TYPE bsak-gsber,
lifnr TYPE bsak-lifnr,
bukrs TYPE bsak-bukrs,
lifnr TYPE bsak-lifnr,
umsks TYPE bsak-umsks,
umskz TYPE bsak-umskz,
augdt TYPE bsak-augdt,
augbl TYPE bsak-augbl,
zuonr TYPE bsak-zuonr,
gjahr TYPE bsak-gjahr,
belnr TYPE bsak-belnr,
buzei TYPE bsak-buzei,
budat TYPE bsak-budat,
bldat TYPE bsak-bldat,
xblnr TYPE bsak-xblnr,
blart TYPE bsak-blart,
monat TYPE bsak-monat,
bschl TYPE bsak-bschl,
zumsk TYPE bsak-zumsk,
shkzg TYPE bsak-shkzg,
dmbtr TYPE bsak-dmbtr,
wrbtr TYPE bsak-wrbtr,
sgtxt TYPE bsak-sgtxt,
saknr TYPE bsak-saknr,
hkont TYPE bsak-hkont,
bukrs TYPE bsik-bukrs,
lifnr TYPE bsik-lifnr,
umsks TYPE bsik-umsks,
umskz TYPE bsik-umskz,
augdt TYPE bsik-augdt,
augbl TYPE bsik-augbl,
zuonr TYPE bsik-zuonr,
gjahr TYPE bsik-gjahr,
belnr TYPE bsik-belnr,
buzei TYPE bsik-buzei,
budat TYPE bsik-budat,
bldat TYPE bsik-bldat,
xblnr TYPE bsik-xblnr,
blart TYPE bsik-blart,
monat TYPE bsik-monat,
bschl TYPE bsik-bschl,
zumsk TYPE bsik-zumsk,
shkzg TYPE bsik-shkzg,
gsber TYPE bsik-gsber,
dmbtr TYPE bsik-dmbtr,
wrbtr TYPE bsik-wrbtr,
sgtxt TYPE bsik-sgtxt,
saknr TYPE bsik-saknr,
hkont TYPE bsik-hkont,
zlsch TYPE bsik-zlsch,
lifnr TYPE lfa1-lifnr,
name1 TYPE lfa1-name1,
line_color(4) TYPE c,
END OF SD_FINAL.
DATA IT_STD_BSAK LIKE TABLE OF SD_BSAK WITH HEADER LINE.
DATA IT_STD_BSIK LIKE TABLE OF SD_BSIK WITH HEADER LINE.
DATA IT_STD_LFA1 LIKE TABLE OF IT_LFA1 WITH HEADER LINE.
DATA IT_STD_FINAL LIKE TABLE OF IT_FINAL WITH HEADER LINE.
DATA IT_FINAL_DISPLAY LIKE TABLE OF SD_FINAL WITH HEADER LINE.
*SELECTION-SCREEN
SELECTION-SCREEN BEGIN OF BLOCK HEADER WITH FRAME TITLE TEXT-001.
PARAMETERS: P_BUKRS LIKE BSAK-BUKRS OBLIGATORY.
SELECT-OPTIONS : S_GJAHR FOR BSAK-GJAHR.
SELECT-OPTIONS: S_LIFNR FOR BSAK-LIFNR.
SELECT-OPTIONS: S_MONAT FOR BSAK-MONAT.
SELECTION-SCREEN END OF BLOCK HEADER.
START-OF-SELECTION.
SET PF-STATUS 'STATUS'.
PERFORM DATA_RETRIVAL.
PERFORM FIELD.
PERFORM EVENTS USING EVENTS.
PERFORM EVENTS_1 USING EVENTS.
PERFORM HEADER USING TOP.
PERFORM LAYOUT.
PERFORM DISPLAY.
END-OF-PAGE.
*& Form DATA_RETRIVAL
text
--> p1 text
<-- p2 text
FORM DATA_RETRIVAL .
SELECT BUKRS LIFNR UMSKS UMSKZ AUGDT AUGBL ZUONR GJAHR BELNR BUZEI BUDAT BLDAT XBLNR BLART
MONAT BSCHL ZUMSK SHKZG GSBER DMBTR WRBTR SGTXT SAKNR HKONT
FROM BSAK INTO TABLE IT_STD_BSAK
WHERE BUKRS = P_BUKRS
AND GJAHR IN S_GJAHR
AND LIFNR IN S_LIFNR
AND MONAT IN S_MONAT.
IF NOT IT_STD_BSAK[] IS INITIAL.
SELECT BUKRS LIFNR UMSKS UMSKZ AUGDT AUGBL ZUONR GJAHR BELNR BUZEI BUDAT BLDAT XBLNR
BLART MONAT BSCHL ZUMSK SHKZG GSBER DMBTR WRBTR SGTXT SAKNR HKONT ZLSCH
FROM BSIK INTO TABLE IT_STD_BSIK FOR ALL ENTRIES IN IT_STD_BSAK
WHERE BUKRS = IT_STD_BSAK-BUKRS AND LIFNR = IT_STD_BSAK-LIFNR AND GJAHR = IT_STD_BSAK-GJAHR .
ENDIF.
IF NOT IT_STD_BSAK[] IS INITIAL.
SELECT LIFNR NAME1
FROM LFA1 INTO TABLE IT_STD_LFA1 FOR ALL ENTRIES IN IT_STD_BSAK
WHERE LIFNR = IT_STD_BSAK-LIFNR.
ENDIF.
LOOP AT IT_STD_BSAK.
IT_STD_FINAL-BUKRS = IT_STD_BSAK-BUKRS.
IT_STD_FINAL-LIFNR = IT_STD_BSAK-LIFNR.
IT_STD_FINAL-UMSKS = IT_STD_BSAK-UMSKS.
IT_STD_FINAL-UMSKZ = IT_STD_BSAK-UMSKZ.
IT_STD_FINAL-AUGDT = IT_STD_BSAK-AUGDT.
IT_STD_FINAL-AUGBL = IT_STD_BSAK-AUGBL.
IT_STD_FINAL-ZUONR = IT_STD_BSAK-ZUONR.
IT_STD_FINAL-GJAHR = IT_STD_BSAK-GJAHR.
IT_STD_FINAL-BELNR = IT_STD_BSAK-BELNR.
IT_STD_FINAL-BUZEI = IT_STD_BSAK-BUZEI.
IT_STD_FINAL-BUDAT = IT_STD_BSAK-BUDAT.
IT_STD_FINAL-BLDAT = IT_STD_BSAK-BLDAT.
IT_STD_FINAL-XBLNR = IT_STD_BSAK-XBLNR.
IT_STD_FINAL-BLART = IT_STD_BSAK-BLART.
IT_STD_FINAL-MONAT = IT_STD_BSAK-MONAT.
IT_STD_FINAL-BSCHL = IT_STD_BSAK-BSCHL.
IT_STD_FINAL-ZUMSK = IT_STD_BSAK-ZUMSK.
IT_STD_FINAL-SHKZG = IT_STD_BSAK-SHKZG.
IT_STD_FINAL-GSBER = IT_STD_BSAK-GSBER.
IT_STD_FINAL-DMBTR = IT_STD_BSAK-DMBTR.
IT_STD_FINAL-WRBTR = IT_STD_BSAK-WRBTR.
IT_STD_FINAL-SGTXT = IT_STD_BSAK-SGTXT.
IT_STD_FINAL-SAKNR = IT_STD_BSAK-SAKNR.
IT_STD_FINAL-HKONT = IT_STD_BSAK-HKONT.
READ TABLE IT_STD_LFA1 WITH KEY LIFNR = IT_STD_FINAL-LIFNR.
IF SY-SUBRC = 0.
IT_STD_FINAL-NAME1 = IT_STD_LFA1-NAME1.
ENDIF.
APPEND IT_STD_FINAL.
CLEAR IT_STD_FINAL.
ENDLOOP.
LOOP AT IT_STD_BSIK.
IF SY-SUBRC = 0.
IT_STD_FINAL-BUKRS = IT_STD_BSIK-BUKRS.
IT_STD_FINAL-LIFNR = IT_STD_BSIK-LIFNR.
IT_STD_FINAL-UMSKS = IT_STD_BSIK-UMSKS.
IT_STD_FINAL-UMSKZ = IT_STD_BSIK-UMSKZ.
IT_STD_FINAL-AUGDT = IT_STD_BSIK-AUGDT.
IT_STD_FINAL-AUGBL = IT_STD_BSIK-AUGBL.
IT_STD_FINAL-ZUONR = IT_STD_BSIK-ZUONR.
IT_STD_FINAL-GJAHR = IT_STD_BSIK-GJAHR.
IT_STD_FINAL-BELNR = IT_STD_BSIK-BELNR.
IT_STD_FINAL-BUZEI = IT_STD_BSIK-BUZEI.
IT_STD_FINAL-BUDAT = IT_STD_BSIK-BUDAT.
IT_STD_FINAL-BLDAT = IT_STD_BSIK-BLDAT.
IT_STD_FINAL-XBLNR = IT_STD_BSIK-XBLNR.
IT_STD_FINAL-BLART = IT_STD_BSIK-BLART.
IT_STD_FINAL-MONAT = IT_STD_BSIK-MONAT.
IT_STD_FINAL-BSCHL = IT_STD_BSIK-BSCHL.
IT_STD_FINAL-ZUMSK = IT_STD_BSIK-ZUMSK.
IT_STD_FINAL-SHKZG = IT_STD_BSIK-SHKZG.
IT_STD_FINAL-GSBER = IT_STD_BSIK-GSBER.
IT_STD_FINAL-DMBTR = IT_STD_BSIK-DMBTR.
IT_STD_FINAL-WRBTR = IT_STD_BSIK-WRBTR.
IT_STD_FINAL-SGTXT = IT_STD_BSIK-SGTXT.
IT_STD_FINAL-SAKNR = IT_STD_BSIK-SAKNR.
IT_STD_FINAL-HKONT = IT_STD_BSIK-HKONT.
IT_STD_FINAL-ZLSCH = IT_STD_BSIK-ZLSCH.
ENDIF.
APPEND IT_STD_FINAL.
CLEAR IT_STD_FINAL.
ENDLOOP.
LOOP AT IT_STD_FINAL.
IF IT_STD_FINAL-SHKZG = 'S'.
IT_STD_FINAL-DMBTR_S = IT_STD_FINAL-DMBTR.
ELSE.
IF IT_STD_FINAL-SHKZG = 'H'.
IT_STD_FINAL-DMBTR_H = IT_STD_FINAL-DMBTR.
ENDIF.
ENDIF.
IT_STD_FINAL-DMBTR = ''.
MODIFY IT_STD_FINAL INDEX SY-TABIX TRANSPORTING DMBTR_H DMBTR_S DMBTR.
"VAR.
CLEAR IT_STD_FINAL.
ENDLOOP.
SORT IT_STD_FINAL BY LIFNR GSBER GJAHR.
ENDFORM. " DATA_RETRIVAL
*& Form FIELD
text
--> p1 text
<-- p2 text
form FIELD .
LCAT-FIELDNAME = 'LIFNR'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'Vendor No'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
LCAT-FIELDNAME = 'NAME1'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'Vendor Name'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
LCAT-FIELDNAME = 'GJAHR'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'Fiscal Year'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
LCAT-FIELDNAME = 'GSBER'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'BussArea'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
LCAT-FIELDNAME = 'DMBTR_S'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'Debit Balanace'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
LCAT-FIELDNAME = 'DMBTR_H'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'Credit Balance'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
LCAT-FIELDNAME = 'BAL'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'Accumulated Balance'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
endform. " FIELD
*& Form DISPLAY
text
--> p1 text
<-- p2 text
form DISPLAY .
CLEAR: IT_STD_BSAK,IT_STD_BSIK, IT_STD_LFA1 .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'STATUS '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = LAYOUT
IT_FIELDCAT = FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT = IT_SORT
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = EVENTS
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = IT_CHARG
t_outtab = IT_STD_FINAL[]
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "DISPLAY
*& Form EVENTS
text
--> p1 text
<-- p2 text
form EVENTS USING P_EVENTS TYPE slis_t_event.
DATA: ls_event TYPE slis_alv_event.
ls_event-name = 'TOP_OF_PAGE'.
ls_event-form = 'TOP_OF_PAGE'.
APPEND ls_event TO P_EVENTS.
endform. " EVENTS
*& Form TOP_OF_PAGE
text
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = TOP.
ENDFORM. "TOP_OF_PAGE
*& Form LAYOUT
text
--> p1 text
<-- p2 text
form LAYOUT .
LAYOUT-ZEBRA = 'X'.
LAYOUT-INFO_FIELDNAME = 'LINE_COLOR'.
LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
APPEND LAYOUT." TO LAYOUT.
endform. " LAYOUT
*& Form EVENTS_1
text
-->P_EVENTS text
FORM EVENTS_1 USING P_EVENTS TYPE slis_t_event.
DATA: ls_event TYPE slis_alv_event.
WRITE: SY-UNAME.
ls_event-name = 'END_OF_PAGE'.
ls_event-form = 'END_OF_PAGE'.
APPEND ls_event TO P_EVENTS.
ENDFORM. " EVENTS_1Seniors , Please Help me with this Requirment
BUKRS _____________________
GJAHR ____________________
LIFNR _____________________
MONAT _____________________
LIFNR NAME1 GSBER GJAHR HBAL SBAL ACCUMBAL
1001 ABB BUSS1 2005 300 00
ABB BUSS1 2005 00 100
300 100 (300-100)=200
ABB BUSS1 2006 200 00
ABB BUSS1 2006 200 00
400 00 (400-00)+ 200 =
600
ABB BUSS2 2005 300 00
ABB BUSS2 2005 00 100
300 100 ( 300-100) =200
ABB BUSS2 2006 400 00
ABB BUSS2 2006 00 100
400 100 (400-100)+200 =
500 ****************************************************************************
1400 300 (1400-300) **********************************************************************************************************
Same for the Next Vendor also...
This is the report for this Requirment i am working on....Please Help me in the Logic..How to Go on with it....
*& Report ZVENDOR_RECONCILLATION
REPORT ZVENDOR_RECONCILLATION.
TABLES : BSAK , BSIK , LFC1 , LFC3 , LFA1.
*ALV
TYPE-POOLS: SLIS.
*TYPE-POOLS icon.
DATA: It_SORT TYPE SLIS_T_SORTINFO_ALV ."WITH HEADER LINE.
DATA: TOP TYPE slis_t_listheader,
END TYPE slis_t_listheader,
EVENTS TYPE slis_t_event.
DATA : T_KEY TYPE SLIS_KEYINFO_ALV.
DATA : FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
LAYOUT TYPE SLIS_LAYOUT_ALV OCCURS 1 WITH HEADER LINE ,
LCAT TYPE SLIS_FIELDCAT_ALV.
*INTERNAL TABLE
DATA: BEGIN OF sd_bsak,
bukrs TYPE bsak-bukrs,
lifnr TYPE bsak-lifnr,
umsks TYPE bsak-umsks,
umskz TYPE bsak-umskz,
augdt TYPE bsak-augdt,
augbl TYPE bsak-augbl,
zuonr TYPE bsak-zuonr,
gjahr TYPE bsak-gjahr,
belnr TYPE bsak-belnr,
buzei TYPE bsak-buzei,
budat TYPE bsak-budat,
bldat TYPE bsak-bldat,
xblnr TYPE bsak-xblnr,
blart TYPE bsak-blart,
monat TYPE bsak-monat,
bschl TYPE bsak-bschl,
zumsk TYPE bsak-zumsk,
shkzg TYPE bsak-shkzg,
gsber TYPE bsak-gsber,
dmbtr TYPE bsak-dmbtr,
wrbtr TYPE bsak-wrbtr,
sgtxt TYPE bsak-sgtxt,
saknr TYPE bsak-saknr,
hkont TYPE bsak-hkont,
END OF sd_bsak.
DATA: BEGIN OF sd_bsik,
bukrs TYPE bsik-bukrs,
lifnr TYPE bsik-lifnr,
umsks TYPE bsik-umsks,
umskz TYPE bsik-umskz,
augdt TYPE bsik-augdt,
augbl TYPE bsik-augbl,
zuonr TYPE bsik-zuonr,
gjahr TYPE bsik-gjahr,
belnr TYPE bsik-belnr,
buzei TYPE bsik-buzei,
budat TYPE bsik-budat,
bldat TYPE bsik-bldat,
xblnr TYPE bsik-xblnr,
blart TYPE bsik-blart,
monat TYPE bsik-monat,
bschl TYPE bsik-bschl,
zumsk TYPE bsik-zumsk,
shkzg TYPE bsik-shkzg,
gsber TYPE bsik-gsber,
dmbtr TYPE bsik-dmbtr,
wrbtr TYPE bsik-wrbtr,
sgtxt TYPE bsik-sgtxt,
saknr TYPE bsik-saknr,
hkont TYPE bsik-hkont,
zlsch TYPE bsik-zlsch,
END OF sd_bsik.
DATA: BEGIN OF it_lfa1,
lifnr TYPE lfa1-lifnr,
name1 TYPE lfa1-name1,
END OF it_lfa1.
*FINAL INTERNAL TABLE DECLARATION
DATA: BEGIN OF IT_FINAL,
lifnr TYPE bsak-lifnr,
gsber TYPE bsak-gsber,
bukrs TYPE bsak-bukrs,
umsks TYPE bsak-umsks,
umskz TYPE bsak-umskz,
augdt TYPE bsak-augdt,
augbl TYPE bsak-augbl,
zuonr TYPE bsak-zuonr,
gjahr TYPE bsak-gjahr,
belnr TYPE bsak-belnr,
buzei TYPE bsak-buzei,
budat TYPE bsak-budat,
bldat TYPE bsak-bldat,
xblnr TYPE bsak-xblnr,
blart TYPE bsak-blart,
monat TYPE bsak-monat,
bschl TYPE bsak-bschl,
zumsk TYPE bsak-zumsk,
shkzg TYPE bsak-shkzg,
gsber TYPE bsak-gsber,
dmbtr TYPE bsak-dmbtr,
wrbtr TYPE bsak-wrbtr,
sgtxt TYPE bsak-sgtxt,
saknr TYPE bsak-saknr,
hkont TYPE bsak-hkont,
DMBTR_S TYPE BSAK-DMBTR,
DMBTR_H TYPE BSAK-DMBTR,
DS TYPE P DECIMALS 2,
DH TYPE P DECIMALS 2,
SUB TYPE P DECIMALS 2,
ADD TYPE P DECIMALS 2,
BAL TYPE P DECIMALS 2,
lifnr TYPE bsik-lifnr,
umsks TYPE bsik-umsks,
umskz TYPE bsik-umskz,
augdt TYPE bsik-augdt,
augbl TYPE bsik-augbl,
zuonr TYPE bsik-zuonr,
gjahr TYPE bsik-gjahr,
belnr TYPE bsik-belnr,
buzei TYPE bsik-buzei,
budat TYPE bsik-budat,
bldat TYPE bsik-bldat,
xblnr TYPE bsik-xblnr,
blart TYPE bsik-blart,
monat TYPE bsik-monat,
bschl TYPE bsik-bschl,
zumsk TYPE bsik-zumsk,
shkzg TYPE bsik-shkzg,
gsber TYPE bsik-gsber,
dmbtr TYPE bsik-dmbtr,
wrbtr TYPE bsik-wrbtr,
sgtxt TYPE bsik-sgtxt,
saknr TYPE bsik-saknr,
hkont TYPE bsik-hkont,
zlsch TYPE bsik-zlsch,
lifnr TYPE lfa1-lifnr,
name1 TYPE lfa1-name1,
END OF IT_FINAL.
DATA: BEGIN OF SD_FINAL,
gsber TYPE bsak-gsber,
lifnr TYPE bsak-lifnr,
bukrs TYPE bsak-bukrs,
lifnr TYPE bsak-lifnr,
umsks TYPE bsak-umsks,
umskz TYPE bsak-umskz,
augdt TYPE bsak-augdt,
augbl TYPE bsak-augbl,
zuonr TYPE bsak-zuonr,
gjahr TYPE bsak-gjahr,
belnr TYPE bsak-belnr,
buzei TYPE bsak-buzei,
budat TYPE bsak-budat,
bldat TYPE bsak-bldat,
xblnr TYPE bsak-xblnr,
blart TYPE bsak-blart,
monat TYPE bsak-monat,
bschl TYPE bsak-bschl,
zumsk TYPE bsak-zumsk,
shkzg TYPE bsak-shkzg,
dmbtr TYPE bsak-dmbtr,
wrbtr TYPE bsak-wrbtr,
sgtxt TYPE bsak-sgtxt,
saknr TYPE bsak-saknr,
hkont TYPE bsak-hkont,
bukrs TYPE bsik-bukrs,
lifnr TYPE bsik-lifnr,
umsks TYPE bsik-umsks,
umskz TYPE bsik-umskz,
augdt TYPE bsik-augdt,
augbl TYPE bsik-augbl,
zuonr TYPE bsik-zuonr,
gjahr TYPE bsik-gjahr,
belnr TYPE bsik-belnr,
buzei TYPE bsik-buzei,
budat TYPE bsik-budat,
bldat TYPE bsik-bldat,
xblnr TYPE bsik-xblnr,
blart TYPE bsik-blart,
monat TYPE bsik-monat,
bschl TYPE bsik-bschl,
zumsk TYPE bsik-zumsk,
shkzg TYPE bsik-shkzg,
gsber TYPE bsik-gsber,
dmbtr TYPE bsik-dmbtr,
wrbtr TYPE bsik-wrbtr,
sgtxt TYPE bsik-sgtxt,
saknr TYPE bsik-saknr,
hkont TYPE bsik-hkont,
zlsch TYPE bsik-zlsch,
lifnr TYPE lfa1-lifnr,
name1 TYPE lfa1-name1,
line_color(4) TYPE c,
END OF SD_FINAL.
DATA IT_STD_BSAK LIKE TABLE OF SD_BSAK WITH HEADER LINE.
DATA IT_STD_BSIK LIKE TABLE OF SD_BSIK WITH HEADER LINE.
DATA IT_STD_LFA1 LIKE TABLE OF IT_LFA1 WITH HEADER LINE.
DATA IT_STD_FINAL LIKE TABLE OF IT_FINAL WITH HEADER LINE.
DATA IT_FINAL_DISPLAY LIKE TABLE OF SD_FINAL WITH HEADER LINE.
*SELECTION-SCREEN
SELECTION-SCREEN BEGIN OF BLOCK HEADER WITH FRAME TITLE TEXT-001.
PARAMETERS: P_BUKRS LIKE BSAK-BUKRS OBLIGATORY.
SELECT-OPTIONS : S_GJAHR FOR BSAK-GJAHR.
SELECT-OPTIONS: S_LIFNR FOR BSAK-LIFNR.
SELECT-OPTIONS: S_MONAT FOR BSAK-MONAT.
SELECTION-SCREEN END OF BLOCK HEADER.
START-OF-SELECTION.
SET PF-STATUS 'STATUS'.
PERFORM DATA_RETRIVAL.
PERFORM FIELD.
PERFORM EVENTS USING EVENTS.
PERFORM EVENTS_1 USING EVENTS.
PERFORM HEADER USING TOP.
PERFORM LAYOUT.
PERFORM DISPLAY.
END-OF-PAGE.
*& Form DATA_RETRIVAL
text
--> p1 text
<-- p2 text
FORM DATA_RETRIVAL .
SELECT BUKRS LIFNR UMSKS UMSKZ AUGDT AUGBL ZUONR GJAHR BELNR BUZEI BUDAT BLDAT XBLNR BLART
MONAT BSCHL ZUMSK SHKZG GSBER DMBTR WRBTR SGTXT SAKNR HKONT
FROM BSAK INTO TABLE IT_STD_BSAK
WHERE BUKRS = P_BUKRS
AND GJAHR IN S_GJAHR
AND LIFNR IN S_LIFNR
AND MONAT IN S_MONAT.
IF NOT IT_STD_BSAK[] IS INITIAL.
SELECT BUKRS LIFNR UMSKS UMSKZ AUGDT AUGBL ZUONR GJAHR BELNR BUZEI BUDAT BLDAT XBLNR
BLART MONAT BSCHL ZUMSK SHKZG GSBER DMBTR WRBTR SGTXT SAKNR HKONT ZLSCH
FROM BSIK INTO TABLE IT_STD_BSIK FOR ALL ENTRIES IN IT_STD_BSAK
WHERE BUKRS = IT_STD_BSAK-BUKRS AND LIFNR = IT_STD_BSAK-LIFNR AND GJAHR = IT_STD_BSAK-GJAHR .
ENDIF.
IF NOT IT_STD_BSAK[] IS INITIAL.
SELECT LIFNR NAME1
FROM LFA1 INTO TABLE IT_STD_LFA1 FOR ALL ENTRIES IN IT_STD_BSAK
WHERE LIFNR = IT_STD_BSAK-LIFNR.
ENDIF.
LOOP AT IT_STD_BSAK.
IT_STD_FINAL-BUKRS = IT_STD_BSAK-BUKRS.
IT_STD_FINAL-LIFNR = IT_STD_BSAK-LIFNR.
IT_STD_FINAL-UMSKS = IT_STD_BSAK-UMSKS.
IT_STD_FINAL-UMSKZ = IT_STD_BSAK-UMSKZ.
IT_STD_FINAL-AUGDT = IT_STD_BSAK-AUGDT.
IT_STD_FINAL-AUGBL = IT_STD_BSAK-AUGBL.
IT_STD_FINAL-ZUONR = IT_STD_BSAK-ZUONR.
IT_STD_FINAL-GJAHR = IT_STD_BSAK-GJAHR.
IT_STD_FINAL-BELNR = IT_STD_BSAK-BELNR.
IT_STD_FINAL-BUZEI = IT_STD_BSAK-BUZEI.
IT_STD_FINAL-BUDAT = IT_STD_BSAK-BUDAT.
IT_STD_FINAL-BLDAT = IT_STD_BSAK-BLDAT.
IT_STD_FINAL-XBLNR = IT_STD_BSAK-XBLNR.
IT_STD_FINAL-BLART = IT_STD_BSAK-BLART.
IT_STD_FINAL-MONAT = IT_STD_BSAK-MONAT.
IT_STD_FINAL-BSCHL = IT_STD_BSAK-BSCHL.
IT_STD_FINAL-ZUMSK = IT_STD_BSAK-ZUMSK.
IT_STD_FINAL-SHKZG = IT_STD_BSAK-SHKZG.
IT_STD_FINAL-GSBER = IT_STD_BSAK-GSBER.
IT_STD_FINAL-DMBTR = IT_STD_BSAK-DMBTR.
IT_STD_FINAL-WRBTR = IT_STD_BSAK-WRBTR.
IT_STD_FINAL-SGTXT = IT_STD_BSAK-SGTXT.
IT_STD_FINAL-SAKNR = IT_STD_BSAK-SAKNR.
IT_STD_FINAL-HKONT = IT_STD_BSAK-HKONT.
READ TABLE IT_STD_LFA1 WITH KEY LIFNR = IT_STD_FINAL-LIFNR.
IF SY-SUBRC = 0.
IT_STD_FINAL-NAME1 = IT_STD_LFA1-NAME1.
ENDIF.
APPEND IT_STD_FINAL.
CLEAR IT_STD_FINAL.
ENDLOOP.
LOOP AT IT_STD_BSIK.
IF SY-SUBRC = 0.
IT_STD_FINAL-BUKRS = IT_STD_BSIK-BUKRS.
IT_STD_FINAL-LIFNR = IT_STD_BSIK-LIFNR.
IT_STD_FINAL-UMSKS = IT_STD_BSIK-UMSKS.
IT_STD_FINAL-UMSKZ = IT_STD_BSIK-UMSKZ.
IT_STD_FINAL-AUGDT = IT_STD_BSIK-AUGDT.
IT_STD_FINAL-AUGBL = IT_STD_BSIK-AUGBL.
IT_STD_FINAL-ZUONR = IT_STD_BSIK-ZUONR.
IT_STD_FINAL-GJAHR = IT_STD_BSIK-GJAHR.
IT_STD_FINAL-BELNR = IT_STD_BSIK-BELNR.
IT_STD_FINAL-BUZEI = IT_STD_BSIK-BUZEI.
IT_STD_FINAL-BUDAT = IT_STD_BSIK-BUDAT.
IT_STD_FINAL-BLDAT = IT_STD_BSIK-BLDAT.
IT_STD_FINAL-XBLNR = IT_STD_BSIK-XBLNR.
IT_STD_FINAL-BLART = IT_STD_BSIK-BLART.
IT_STD_FINAL-MONAT = IT_STD_BSIK-MONAT.
IT_STD_FINAL-BSCHL = IT_STD_BSIK-BSCHL.
IT_STD_FINAL-ZUMSK = IT_STD_BSIK-ZUMSK.
IT_STD_FINAL-SHKZG = IT_STD_BSIK-SHKZG.
IT_STD_FINAL-GSBER = IT_STD_BSIK-GSBER.
IT_STD_FINAL-DMBTR = IT_STD_BSIK-DMBTR.
IT_STD_FINAL-WRBTR = IT_STD_BSIK-WRBTR.
IT_STD_FINAL-SGTXT = IT_STD_BSIK-SGTXT.
IT_STD_FINAL-SAKNR = IT_STD_BSIK-SAKNR.
IT_STD_FINAL-HKONT = IT_STD_BSIK-HKONT.
IT_STD_FINAL-ZLSCH = IT_STD_BSIK-ZLSCH.
ENDIF.
APPEND IT_STD_FINAL.
CLEAR IT_STD_FINAL.
ENDLOOP.
LOOP AT IT_STD_FINAL.
IF IT_STD_FINAL-SHKZG = 'S'.
IT_STD_FINAL-DMBTR_S = IT_STD_FINAL-DMBTR.
ELSE.
IF IT_STD_FINAL-SHKZG = 'H'.
IT_STD_FINAL-DMBTR_H = IT_STD_FINAL-DMBTR.
ENDIF.
ENDIF.
IT_STD_FINAL-DMBTR = ''.
MODIFY IT_STD_FINAL INDEX SY-TABIX TRANSPORTING DMBTR_H DMBTR_S DMBTR.
"VAR.
CLEAR IT_STD_FINAL.
ENDLOOP.
SORT IT_STD_FINAL BY LIFNR GSBER GJAHR.
ENDFORM. " DATA_RETRIVAL
*& Form FIELD
text
--> p1 text
<-- p2 text
form FIELD .
LCAT-FIELDNAME = 'LIFNR'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'Vendor No'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
LCAT-FIELDNAME = 'NAME1'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'Vendor Name'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
LCAT-FIELDNAME = 'GJAHR'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'Fiscal Year'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
LCAT-FIELDNAME = 'GSBER'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'BussArea'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
LCAT-FIELDNAME = 'DMBTR_S'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'Debit Balanace'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
LCAT-FIELDNAME = 'DMBTR_H'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'Credit Balance'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
LCAT-FIELDNAME = 'BAL'.
LCAT-TABNAME = 'IT_STD_FINAL'.
LCAT-SELTEXT_L = 'Accumulated Balance'.
LCAT-JUST = 'M'.
APPEND LCAT TO FIELDCAT.
CLEAR LCAT.
endform. " FIELD
*& Form DISPLAY
text
--> p1 text
<-- p2 text
form DISPLAY .
CLEAR: IT_STD_BSAK,IT_STD_BSIK, IT_STD_LFA1 .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'STATUS '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = LAYOUT
IT_FIELDCAT = FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT = IT_SORT
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = EVENTS
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = IT_CHARG
t_outtab = IT_STD_FINAL[]
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "DISPLAY
*& Form EVENTS
text
--> p1 text
<-- p2 text
form EVENTS USING P_EVENTS TYPE slis_t_event.
DATA: ls_event TYPE slis_alv_event.
ls_event-name = 'TOP_OF_PAGE'.
ls_event-form = 'TOP_OF_PAGE'.
APPEND ls_event TO P_EVENTS.
endform. " EVENTS
*& Form TOP_OF_PAGE
text
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = TOP.
ENDFORM. "TOP_OF_PAGE
*& Form LAYOUT
text
--> p1 text
<-- p2 text
form LAYOUT .
LAYOUT-ZEBRA = 'X'.
LAYOUT-INFO_FIELDNAME = 'LINE_COLOR'.
LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
APPEND LAYOUT." TO LAYOUT.
endform. " LAYOUT
*& Form EVENTS_1
text
-->P_EVENTS text
FORM EVENTS_1 USING P_EVENTS TYPE slis_t_event.
DATA: ls_event TYPE slis_alv_event.
WRITE: SY-UNAME.
ls_event-name = 'END_OF_PAGE'.
ls_event-form = 'END_OF_PAGE'.
APPEND ls_event TO P_EVENTS.
ENDFORM. " EVENTS_1 -
Hi All,
I have a number on the selection-screen.I need to prepare a structure with fields equal to the number provided on the selection screen.please help me with it.
Thanks in advance,
kushagra sharmaHi Kushagra,
Below is one way of doing it.
First create a dynamic internal table, taking number of fields from selection screen using cl_alv_table_create=>create_dynamic_table.
Then create a dynamic structure for that dynamic internal table.
Ex:
DATA:fcat_wa TYPE lvc_s_fcat,
fcat_itab TYPE lvc_t_fcat,
poi_itab TYPE REF TO data,
poi_itab1 TYPE REF TO data,
cha(4) TYPE c.
FIELD-SYMBOLS: <itab> TYPE STANDARD TABLE,
<wa> TYPE ANY.
PARAMETERS: p_num TYPE i. " Number of fields
DO p_num TIMES.
cha = sy-index.
CONCATENATE 'F' cha INTO cha.
CONDENSE cha NO-GAPS.
fcat_wa-fieldname = cha.
fcat_wa-datatype = 'STRG'.
APPEND fcat_wa TO fcat_itab.
ENDDO.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = fcat_itab
IMPORTING
ep_table = poi_itab
EXCEPTIONS
generate_subpool_dir_full = 1
OTHERS = 2.
ASSIGN poi_itab->* TO <itab>. " Dynamic internal table
CREATE DATA poi_itab1 LIKE LINE OF <itab>.
ASSIGN poi_itab1->* TO <wa>. " Dynamic structure
Hope it helps u.
Thanks,
Edited by: Sap Fan on Oct 28, 2009 3:41 PM -
Help me with this logic:
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Oct 22 14:36:17 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> connect system/abcd
Connected.
SQL> select to_date('12-oct','dd') from dual;
select to_date('12-oct','dd') from dual
ERROR at line 1:
ORA-01830: date format picture ends before converting entire input string
Why do I get this error message??
Do I always have to provide the string in the format 'dd-mon-yyyy' or 'dd-mon-yy'?
If so then why do I not get the error for something like:
select to_char(to_date(to_char(sysdate,'dd'),'dd'),'year') from dual;
Please help me with this........
I am studying for OCA exam 1Z0-051.....wishing to give the exam early next monthHi,
803030 wrote:
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Oct 22 14:36:17 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> connect system/abcd
Connected.
SQL> select to_date('12-oct','dd') from dual;
select to_date('12-oct','dd') from dual
ERROR at line 1:
ORA-01830: date format picture ends before converting entire input string
Why do I get this error message??
Do I always have to provide the string in the format 'dd-mon-yyyy' or 'dd-mon-yy'?No, the 1st argument does not always have to be in a particular format. That's what the 2nd argument is for: it says what format the first argument is in.
It helps if you write the two arguments on separate lines, the 2nd rught below the 1st:
TO_DATE ( '12-oct'
, 'dd-mon'
)and
TO_DATE ( '12'
, 'dd'
)are both okay: the two arguments match.
The following, however, is wrong:
TO_DATE ( '12-oct' -- ERROR! This is 6 characters
, 'dd' -- This is only 2 characters
If so then why do I not get the error for something like:
select to_char(to_date(to_char(sysdate,'dd'),'dd'),'year') from dual;If you want to understand a complicated expression, break it down into parts, starting from the inside.
For example, start with
SELECT TO_CHAR (SYSDATE, 'dd')
FROM dual;Assuming today is October 22, 2010, this produces the string '22'.
So if the result of TO_CHAR (SYSDATE, 'dd') is '22', then
SELECT TO_DATE ( TO_CHAR (SYSDATE, 'DD')
, 'DD'
FROM dual;is equivalent to
SELECT TO_DATE ( '22'
, 'DD'
FROM dual;which returns tHE DATE October 22, 2010, 00:00:00. (When you don't specify the year or month, they default to the current year or month. when you don't specify the hurs, minutes or seconds, they default to 00.)
So, if d is a DATE, October 22, 2010, 00:00:00, then
SELECT TO_CHAR ( d
, 'year'
FROM dual;returns '2010'.
Don't take my word for it. Run these querries, and similar ones you think of, yourself. -
Can anyone please help me with the logic for this..
hi all,
os has the value Windows 2000
IF os CP 'WINDOWS' OR os CP 'SUN'.
OS1 = 'X'.
ENDIF.
(if i test this,
os1 doesnot have any value, (should be x)).
This doesnot work for me.
Any suggestions.
Regards,
Sukumar.Dear Sukumar,
just use the F1 help on CP in ABAP code, there is a description.
I think you need to use the asterix '*' than it will work.
Regards
Tibor
Just check the example:
Report z_example.
data: os1, os type string.
os = 'WINDOWS 2000'.
IF os CP 'WINDOWS' OR os CP 'SUN' or os = space.
OS1 = 'X'.
ENDIF.
write: / os1. -
Help required with User exit logic
Hi gurus,
Please help me with the logic I wrote for the user exit for a PP Work Center View extract structure. Here is the details of the add on fields: VGW01, VGW02, VGW03, STEUS(from table PLPO); DataSource: 2LIS_04_P_ARBPL,
data: l_s_pp1 like MC04P_0ARB(extract structure of 2LIS_04_P_ARBPL),
l_tabix like sy-tabix,
lv_VGW01 like PLPO-VGW01.
lv_VGW02 like PLPO-VGW02.
lv_VGW03 like PLPO-VGW03.
lv_STEUS like PLPO-STEUS.
tables : PLPO.
case i_datasource.
when '2LIS_04_P_ARBPL'.
loop at c_t_data into l_s_pp1.
select single vgw01into lv_vgw01
from PLPO
where field = l_s_pp1-field.
if sy-subrc = 0.
l_s_pp-zzvgw01 = lv_vgw01.
l_s_pp-zzvgw02 = lv_vgw02.
l_s_pp-zzvgw03 = lv_vgw03.
l_s_pp-zzsteus = lv_steus.
endif.
modify c_t_data from l_s_pp1 index l_tabix.
endloop.
Any additional comments welcome. Thanks in advance.Hi,
Try coding as per the below code
case i_datasource.
When '2LIS_04_P_ARBPL'.
DATA: lt_data TYPE TABLE OF MC04P_0ARB.
FIELD-SYMBOLS: <ls_data> TYPE MC04P_0ARB.
Internal table for
TYPES:
BEGIN OF ty_tbl1,
lv_VGW01 TYPE PLPO-VGW01,
lv_VGW02 TYPE PLPO-VGW02,
lv_VGW03 TYPE PLPO-VGW03,
l_bmsch TYPE XXXX-XXXX,
l_plnnr TYPE XXXX-XXXX
l_datuv TYPE XXXX-XXXX
l_aennr TYPE XXXX-XXXX
l_plnkn TYPE XXXX-XXXX
l_plnal TYPE XXXX-XXXX
END OF ty_tbl1.
DATA:
lt_tb1 type standard table of ty_tbq,
ls_tb1 type ty_tb1.
lt_data[] = c_t_data[].
Read data into internal memory using jOins
select aVGW01 aVGW02 aVGW02 aVGW02 bbmsch bplnnr bdatuv baennr bplnkn bplnal into into CORRESPONDING FIELDS OF TABLE
lt_tb1 from PLPO as a innerjoin XXXX as b where aXXXX=bXXXX.
use the internal table to get the data to the enhaced fileds
LOOP AT lt_data ASSIGNING <ls_data>.
read table lt_tb1 into ls_tb1
with key XXXXX = <ls_data>-XXXX .
if sy-subrc eq 0.
<ls_data>-lV_VGW01 = ls_tb1-lv_VGW01,
<ls_data>-lV_VGW02 = ls_tb1-lv_VGW02,
<ls_data>-lV_VGW03 = ls_tb1-lv_VGW03,
<ls_data>-bmsch = ls_tb1-bmsch,
<ls_data>-plnnr = ls_tb1-plnnr,
<ls_data>-datuv = ls_tb1-datuv,
<ls_data>-aennr = ls_tb1-aennr,
<ls_data>-plnkn = ls_tb1-plnkn,
<ls_data>-pln1l = ls_tb1-plnal.
MODIFY lt_data FROM <ls_data>.
endif.
ENDLOOP.
REFRESH c_t_data.
c_t_data[] = lt_data[].
Note that the code is not written with the exact fields. Change the fields where necessary(also i have joined only 2 tables if needs to be joind form more than 2 table change the join statement accordingly).
Thanks,
Nagarjuna
Edited by: Nagarjuna Reddy on Oct 20, 2011 3:39 AM -
Hi,
Can anybody help me with the logic. teh present logic is given below. But as per the new requirement in the Selection screen when I add Material as Select Options then Logic should "expecting to get the report either in Product Group or (single/multiple/range) Material" . Please reply ASAP.
get the list of product groups based on the range entered by the user.
SELECT KSTRG FROM CKPH INTO TABLE I_KSTRG
WHERE KSTRG IN SO_KSTRG.
for each product explode the hierarchy get all sub product groups
LOOP AT I_KSTRG.
CLEAR I_CKPH. REFRESH I_CKPH.
CALL FUNCTION 'K_CKPH_GET_HIERARCHY'
EXPORTING
DATBI = '99991231'
KSTRG = I_KSTRG-KSTRG
TABLES
CKPH_I = I_CKPH
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC EQ 0.
save all unique product groups within the hierarchy.
LOOP AT I_CKPH.
MOVE 'EQ' TO F_KSTRG-OPTION.
MOVE 'I' TO F_KSTRG-SIGN.
MOVE I_CKPH-KSTRG TO F_KSTRG-LOW.
COLLECT F_KSTRG.
MOVE I_CKPH-KSTRG TO KSTRG-LEVEL2.
MOVE I_CKPH-UEKTR TO KSTRG-LEVEL1.
COLLECT KSTRG. CLEAR KSTRG.
ENDLOOP.
ENDIF.
ENDLOOP.
SORT KSTRG BY LEVEL2 LEVEL1.
check if there are product groups extracted.
CLEAR Z_LINES. DESCRIBE TABLE F_KSTRG LINES Z_LINES.
IF Z_LINES GT 0.
get the materials attached to each product group.
SELECT KSTRG WERKS MATNR
INTO CORRESPONDING FIELDS OF TABLE I_CKPE
FROM CKPE
WHERE KSTRG IN F_KSTRG
AND WERKS = PA_WERKS.
IF NOT I_CKPE[] IS INITIAL.
get the order info order number & object number
SELECT AFPOMATNR AUFKOBJNR
INTO CORRESPONDING FIELDS OF TABLE I_AFPO
FROM AFPO AS AFPO INNER JOIN AUFK AS AUFK
ON AFPOAUFNR = AUFKAUFNR
FOR ALL ENTRIES IN I_CKPE
WHERE AFPO~MATNR = I_CKPE-MATNR.
ENDIF.
SORT I_AFPO BY MATNR.
LOOP AT I_CKPE.
get the division for the material.
CLEAR: Z_SPART, MARA.
SELECT SINGLE SPART
INTO Z_SPART
FROM MARA
WHERE MATNR = I_CKPE-MATNR
AND MTART = 'ZTFG'.
MARA-SPART = Z_SPART.
only proceed with processing if division is within users selection
IF Z_SPART IN SO_SPART.
LOOP AT I_AFPO WHERE MATNR = I_CKPE-MATNR.
CLEAR: Z_MATERIAL_FLG, Z_EXPENSES_FLG, Z_SCRAP_FLG,
Z_OUTVAR_FLG, Z_ACTIVITY_FLG.
LOOP AT I_COEP WHERE OBJNR = I_AFPO-OBJNR
AND VRGNG NE 'KOAO'. "changed by Kasturi
PERFORM GET_DATA_FOR_REPORT TABLES I_DATA I_DATA_QTY.
ENDLOOP.
ENDLOOP. "afpo
ENDIF. "division check
ENDLOOP. "ckpe
ELSE.
no product groups extracted.
MESSAGE i011.
ENDIF.Has this been resolved?
Your requirement is not clear. Could you please elaborate more about the output required?
Thanks,
F~Y -
Help! I have had my iMac G5 fitted with new Logic Board but it doesn't work
Help! I have had my iMac G5 fitted with new Logic Board but it doesn't work
I have just had my iMac G5 First Gen 1.8Ghz fitted with a new Logic Board under the Apple Repair Extension Programme for iMacs.
I got the iMac home from the repairers and switched it on and everything was working fine for about 2 hours and then all of a sudden the Error Page came up on the Screen (with a big On/Off Switch Logo) and it said I had to shut down.
So I shut it down waited a few minutes and then tried to re-boot it but nothing happened. All that happended was the Power Light in the Right hand corner came on..but nothing else....
Help! Any ideas what to do please?If you have an external firewire drive (it has to be firewire, USB won't boot on a Rev A), plug it in to the firewire port and turn it on, then boot your iMac and see if it shows on the screen.
Have you tried to hit the eject (up arrow, the last button on the top row of the keyboard) button when you boot, perhaps the repairers left a disc in the drive? Then try and put your install disc in.
Miriam -
I just loaded Lion oxs 10.71 on my I-mac computer, and now my Logic 9 software wont show up it says its not compatible also i cant find my macintosh harddrive icon that is usually shown on dektop and device browser column can anyone help me with this problem.
Mike,
I had a similar issue with Photoshop when I upgraded to both Snow Leopard and Lion. it turned out to be Rosetta is no longer present in the newer OS. Once I upgraded to Lion, Appleworks stopped working after all these years. -
Hi everyone,
If someone can help me with this..
I have a mster table that is used by our billing software which is a non custom designed s/w. I still can work on the tables for that s/w but i do not want to modify any of them and get no references(set const as froeign keys) from them. I want to run some scripts and do some checking on the data..my primary key is invoice in the master table which is auto gen when ever a new invoice is created for a cust.
I want to create a table and that has some fields liked with this invoice...which wud be values like memo or some other comments in another table.
What i need to do is whenever a new record is inserted ie a new inv is generated the invoice number is added in to the sec tabble as well...But the problem here is that i dont want all the invoice numbers to be added as i said i am using a script to check for a condition..so if that invoice number exist true for that cond only then it cud be added....for example we can say it is checkin for total invoice being less then has a particular item so only those invoices with with that item should be added...in to the sec table..
Is there any way to do it without the use of triggers and can someone send me the syntax ...with either the use of triggers..or without them ..
AshishCan anyone help..?
Ashish -
Re: Confused with the logic.Plzz Help.
Hi All,
I am a newbie to Crystal Reports. I am generating a work center report and have some issues with it.
I have an Activity_type and Activity_rate fields grouped by Person responsible for each Plant. I need to get the Activity_type by date.
Logic to do this:
table1.ARBID=table2.OBJID and
table2.OBJID=table3.OBJID and
table1.DATE >= table3.Date
[Imp note: Table1.ARBID is not linked to Table2.OBJID(if i link them, all other data is not getting displayed)].
Also, Logic for Activity_Rate:
Select Table4.TKG001
from table4
where table4.objectno = @form_act_Objno
How can i work with this logic in Crystal reports.
Any kind of advice is appreciated.
Thanks In Advance!!Ragini,
If you are building your data set by adding tables and linking them in the Database Expert then you drawl lines from key field to key field. Right click the link lines and alter the link properties as needed.
The fact that you you used SQL to illustrate your problem leads me to believe that you may actually know SQL. If that's the case you can use a SQL Command as your data source using the native SQL syntax for your database.
something like this:
SELECT
Fieild List
FROM Table1 AS t1
INNER JOIN Table2 AS t2 ON t1.ARBID = t2.OBJID
INNER JOIN Table3 AS t3 ON t2.OBJID = t3.OBJID AND t1.DATE >= t3.DATE
Not sure where Table 4 is coming into the mix... but you can easily pass parameter values back to a SQL Command:
where table4.objectno = '{?form_act_Objno}'
If @form_act_Objno is a formula field... You can't directly pass the results of a formula back to a SQL Command... (You can get to pass into the SQL using sub-report parameters, but it's far from intuitive, requires the use of sub-reports, and id outside the scope of do-ability for most new comers).
If it's a user supplied parameter value... no problem.
HTH,
Jason -
Please help me with the following two questions, very urgent
Hi All,
Please help me with some scenerios about what are the common problems when modifying a standard script such a standard Invoice script and how can we overcome them.
What are the common problems encountered when working with SAP SMARTFORMS and how to overcome them?
Please help me with these questions, its very urgent.
Thanks in advance.
MD.hi
hope it will help you.
reward if ehlp.
How to create a New smartfrom, it is having step by step procedure
http://sap.niraj.tripod.com/id67.html
step by step good ex link is....
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
Here is the procedure
1. Create a new smartforms
Transaction code SMARTFORMS
Create new smartforms call ZSMART
2. Define looping process for internal table
Pages and windows
First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
Here, you can specify your title and page numbering
&SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
Main windows -> TABLE -> DATA
In the Loop section, tick Internal table and fill in
ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
3. Define table in smartforms
Global settings :
Form interface
Variable name Type assignment Reference type
ITAB1 TYPE Table Structure
Global definitions
Variable name Type assignment Reference type
ITAB2 TYPE Table Structure
4. To display the data in the form
Make used of the Table Painter and declare the Line Type in Tabstrips Table
e.g. HD_GEN for printing header details,
IT_GEN for printing data details.
You have to specify the Line Type in your Text elements in the Tabstrips Output options.
Tick the New Line and specify the Line Type for outputting the data.
Declare your output fields in Text elements
Tabstrips - Output Options
For different fonts use this Style : IDWTCERTSTYLE
For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
5. Calling SMARTFORMS from your ABAP program
REPORT ZSMARTFORM.
Calling SMARTFORMS from your ABAP program.
Collecting all the table data in your program, and pass once to SMARTFORMS
SMARTFORMS
Declare your table type in :-
Global Settings -> Form Interface
Global Definintions -> Global Data
Main Window -> Table -> DATA
Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
http://sapr3.tripod.com
TABLES: MKPF.
DATA: FM_NAME TYPE RS38L_FNAM.
DATA: BEGIN OF INT_MKPF OCCURS 0.
INCLUDE STRUCTURE MKPF.
DATA: END OF INT_MKPF.
SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
MOVE-CORRESPONDING MKPF TO INT_MKPF.
APPEND INT_MKPF.
ENDSELECT.
At the end of your program.
Passing data to SMARTFORMS
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function FM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
GS_MKPF = INT_MKPF
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
Smartform
you can check this link here you can see the steps and you can do it the same by looking at it..
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
SMARTFORMS STEPS.
1. In Tcode se11 Create a structure(struct) same like the Internal table that you are going to use in your report.
2. Create Table type(t_struct) of stracture in se11.
3. In your program declare Internal table(Itab) type table of structure(struct).
4. Define work area(wa) like line of internal table.
5. Open Tcode Smartforms
6. In form Global setting , forminterface Import parameter define Internal table(Itab) like table type of stracture(t_struct).
7. In form Global setting , Global definitions , in Global data define Work area(wa) like type stracture(struct).
8. In form pages and window, create Page node by default Page1 is available.
9. In page node you can create numbers of secondary window. But in form there is only one Main window.
10. By right click on page you can create windows or Go to Edit, Node, Create.
11. After creating the window right click on window create table for displaying the data that you are passing through internal table.
12. In the table Data parameter, loop internal internal table (Itab) into work area(wa).
13. In table there are three areas Header, Main Area, Footer.
14. Right click on the Main area create table line by default line type1 is there select it.
15. Divide line into cells according to your need then for each cell create Text node.
16. In text node general attribute. Write down fields of your work area(wa) or write any thing you want to display.
17. Save form and activate it.
18. Then go to Environment, function module name, there you get the name of function module copy it.
19. In your program call the function module that you have copied from your form.
20. In your program in exporting parameter of function pass the internal table(itab).
SAP Smart Forms is introduced in SAP Basis Release 4.6C as the tool for creating and maintaining forms.
SAP Smart Forms allow you to execute simple modifications to the form and in the form logic by using simple graphical tools; in 90% of all cases, this won't include any programming effort. Thus, a power user without any programming knowledge can
configure forms with data from an SAP System for the relevant business processes.
To print a form, you need a program for data retrieval and a Smart Form that contains the entire from logic. As data retrieval and form logic are separated, you must only adapt the Smart Form if changes to the form logic are necessary. The application program passes the data via a function module interface to the Smart Form. When activating the Smart Form, the system automatically generates a function module. At runtime, the system processes this function module.
You can insert static and dynamic tables. This includes line feeds in individual table cells, triggering events for table headings and subtotals, and sorting data before output.
You can check individual nodes as well as the entire form and find any existing errors in the tree structure. The data flow analysis checks whether all fields (variables) have a defined value at the moment they are displayed.
SAP Smart Forms allow you to include graphics, which you can display either as part of the form or as background graphics. You use background graphics to copy the layout of an existing (scanned) form or to lend forms a company-specific look. During printout, you can suppress the background graphic, if desired.
SAP Smart Forms also support postage optimizing.
Also read SAP Note No. 168368 - Smart Forms: New form tool in Release 4.6C
What Transaction to start SAP Smart Forms?
Execute transaction SMARTFORMS to start SAP Smart Forms.
Key Benefits of SAP Smart Forms:
SAP Smart Forms allows you to reduce considerably the implementation costs of mySAP.com solutions since forms can be adjusted in minimum time.
You design a form using the graphical Form Painter and the graphical Table Painter. The form logic is represented by a hierarchy structure (tree structure) that consists of individual nodes, such as nodes for global settings, nodes for texts, nodes for output tables, or nodes for graphics.
To make changes, use Drag & Drop, Copy & Paste, and select different attributes.
These actions do not include writing of coding lines or using a Script language.
Using your form description maintained in the Form Builder, Smart Forms generates a function module that encapsulates layout, content and form logic. So you do not need a group of function modules to print a form, but only one.
For Web publishing, the system provides a generated XML output of the processed form.
Smart Forms provides a data stream called XML for Smart Forms (XSF) to allow the use of 3rd party printing tools. XSF passes form content from R/3 to an external product without passing any layout information about the Smart Form.
SmartForms System Fields
Within a form you can use the field string SFSY with its system fields. During form processing the system replaces these fields with the corresponding values. The field values come from the SAP System or are results of the processing.
System fields of Smart Forms
&SFSY-DATE&
Displays the date. You determine the display format in the user master record.
&SFSY-TIME&
Displays the time of day in the form HH:MM:SS.
&SFSY-PAGE&
Inserts the number of the current print page into the text. You determine the format of the page number (for example, Arabic, numeric) in the page node.
&SFSY-FORMPAGES&
Displays the total number of pages for the currently processed form. This allows you to include texts such as'Page x of y' into your output.
&SFSY-JOBPAGES&
Contains the total page number of all forms in the currently processed print request.
&SFSY-WINDOWNAME&
Contains the name of the current window (string in the Window field)
&SFSY-PAGENAME&
Contains the name of the current page (string in the Page field)
&SFSY-PAGEBREAK&
Is set to 'X' after a page break (either automatic [Page 7] or command-controlled [Page 46])
&SFSY-MAINEND&
Is set as soon as processing of the main window on the current page ends
&SFSY-EXCEPTION&
Contains the name of the raised exception. You must trigger your own exceptions, which you defined in the form interface, using the user_exception macro (syntax: user_exception <exception name >).
Example Forms Available in Standard SAP R/3
SF_EXAMPLE_01
Simple example; invoice with table output of flight booking for one customer
SF_EXAMPLE_02
Similar to SF_EXAMPLE_01 but with subtotals
SF_EXAMPLE_03
Similar to SF_EXAMPLE_02, whereby several customers are selected in the application program; the form is called for each customer and all form outputs are included in an output request
Advantages of SAP Smart Forms
SAP Smart Forms have the following advantages:
1. The adaption of forms is supported to a large extent by graphic tools for layout and logic, so that no programming knowledge is necessary (at least 90% of all adjustments). Therefore, power user forms can also make configurations for your business processes with data from an SAP system. Consultants are only required in special cases.
2. Displaying table structures (dynamic framing of texts)
3. Output of background graphics, for form design in particular the use of templates which were scanned.
4. Colored output of texts
5. User-friendly and integrated Form Painter for the graphical design of forms
6. Graphical Table Painter for drawing tables
7. Reusing Font and paragraph formats in forms (Smart Styles)
8. Data interface in XML format (XML for Smart Forms, in short XSF)
9. Form translation is supported by standard translation tools
10. Flexible reuse of text modules
11. HTML output of forms (Basis release 6.10)
12. Interactive Web forms with input fields, pushbuttons, radio buttons, etc. (Basis-Release 6.10) -
Availablity check with ATP logic
Hi everybody
Can any one tell me where where we assign Checking rule (A - sales order) in availablity check.dear srikanth
please gothough this
TOR AND AVAILANBILITY CHECK
To confirm the quantities for a particular line item in the sales order on particular day system carried out transfer of requirements (TOR) & AVAILABILITY check, so has to confirm the quantity on particular day as system should know what are there requirement of the sale order and delivery with MRP then system carries out availability check function, to confirm the quantity on particular day. Depending upon the IMG setting system carries out availability check function based on 3 methods:
A) Availability Check with ATP logic or against planning:
In ATP logic systems ATP Qty while carrying out availability check function for
Particular line item (ATP qty=warehouse stock +planned receipts planned issues)
Planned Receipts: EX: - purchase requisitions, purchase orders, stock in transfer stock at inspection etc.
Planned Issues: - EX: - open sales order & open delivers
B) Availability check against product allocation:
Availability check can be carried out against product allocations in which system automatically restrict the user to confirm the quantity beyond reserved quantities per particular customer. EX:- Availability qty =100, existing orders=10,then system automatically distributes to items evenly to the sales order.
C) Rule based Availability check:
Rule based availability check can be carried out based on the business transaction.
EX: - For normal sales order system has to carry out availability check for special sales order ex: - cash sales and rush order systems need not to be carry out availability check,
In rule based availability check system in which system carried out Global availability to promise in all plants. In this check system transfers the requirements to APO system where GATP takes place and the result of the availability check transferred to R/3 system. This process takes place with the transaction code CIF(central inter face) inR/3.After carrying out availability check function system proposes(by using ATP logic) default values of ATP check result to the user in a dialog box, in which system gives the choice to the user to take the decision in contest of insufficient stock.
a) One time delivery:
If the user chooses one time delivery and the order Quantity is 100 units system confirms 50 units then systems automatically confirms as a zero. If the user saves the document with the zero confirm qty then system trace the sales order as aback order (V_RA), which can be confirmed later by RESCHEDULLING (V_V2).
b) Complete Delivery:
If order Qty=100, Availability stock = 50, system says that remaining can be given after one week. Then if the user selects this option then system push up existing confirmed qty to after one week and the total qty can be confirmed after one week only.
c) Delivery Proposal:
If order qty=100, system confirms 50, and remaining 50 can be confirmed after one week. If the user chooses this option then system confirms 50 Qty today allows the user to delivery 50 quantities today remaining 50 can be delivered after one week.
CONFIGURATION SETTINGS FOR TOR:
Define Requirement Class:
Path: Img  S&D  Basic functions  Availability Check & Transfer of requirements  Transfer of requirements  Define Requirement classes
Requirement classes control MRP, Requirement consumption, strategy, relevance for planned. It specifics whether the availability check & TOR to be Called out for transactions. Ex: Sales Order
It determines whether requirements relevant for MRP or not, the allocation indicator from the sales view which controls the settlement of customers requirements with planned independent requirements. It determines the item b to be settled as an availability heck. Assignment, the settlement profiles the results analysis key. The TOR and Availability check functions are globally controlled using the requirement class for all the Sales documents. The values from the Requirements class are transferred to scheduled the of the sales documents class are transferred to scheduled the of the sales document default values and can be over written there.
Define Requirements Classes:
Requirement class defines whether the system has to carry out availability check based on the STP Qty. Ex:
Define Requirement Types:
Here we define requirement type, Ex: and Assign to Requirement class that we defined in the promote step.
Determination of Requirement types using Transaction:
Requirement type is going to be determined for sales document by following a search strategy. .
First System checks strategy group in MRP3 view if it trend requirement type then system takes from it, otherwise.
It will go to MRP group in MRP1 view, otherwise
It will check to Material type, otherwise
It will go to item Category + MRP type, otherwise
It will go to Item category only, otherwise
Finally system determines the transaction b not relevant for TOR & Availability check.
Choose Item category TAN+MRP type PD=Requirement type =0
Define Procedure for each schedule the category:
Here we define respective schedule the category of the sales documents, whether an availability check and TOR should be carried out. This setting is relevant for sales documents only. It is fine tuning of availability check for sales documents TOR & Availability check function can be activated at sales order level those are proposed in to schedule line category level. If u wants to deactivate TOR availability check function at schedule the category level and want to deactivate at requirement class level it b impossible.
Ex: If u wants to check availability w/o transferring the requirement we can use it.
Choose schedule line category CP & Activate Availability check, requirement & Product Allocation
Block Quantity confirmation in delivery Blocks:-
When we transfer requirements to MRP then confirmed quantities is also reserved for confirmed sales documents, if transaction is blocked for delivery the reserved quantities are also blocked so that the conformed quantities cannot be used by any other purpose. So has to avoid this situation we can block the transfer of requirements(TOR) for delivery blocks, in this case requirements transferred to MRP but will not be reserved, that will be cleared once we save the documents then system shows confirmed qty as zero.
When we remove the delivery block then system automatically carries out availability check & confirms the qty.
A) Deliveries: Blocking region for sales Area:
Here we define blocking regions for TOR ex:-credit limits
B) Reasons for scope of delivery blocks: TOR. Block:
Ex: - 01 credit limits-check confirmation block.
Maintain Requirements for TOR:-
Here we can define our own requirement with the help of ABAPer for TOR
Ex: - a) 102- prevent reservation in the event of credit block
b) 102-purchase requisitions.
System doesnt create purchase requisitions for sales order line items if it has a credit limit.
Availability check:
Configuration setting:-
Availability check with ATP logic or against planning:-
A) Define checking group:
Checking group defines what kind of requirement record system use to create when sales order & deliveries are processed for this material. We can create 2 kinds of requirements records
Individual requirement records: that means system creates requirement record for each S&D document.
Summarized requirement Records: That means system creates requirement records under certain condition in the material master record. There are 2 type of summarized requirement record:
Summarized requirement records for each day.
Summarized requirement records for each week
Define checking Action;
Here we define 01- daily requirement -B 02- Individual requirements -A
Where B-total record per day
A-single record per day
B) Define material Block for other users:
When 2 users tries to confirm the quantities for the sales order for same material at a time system will be confused to confirm the quantities both sales orders. So has to avoid this kind of situation we can block the materials from confirming the quantities for 2 users at a check, check block
C) Define checking group default values:
Checking group is going to be determined depending upon the material type & plant.
-Go to new entries, specify material type, ex;-FERT
& plant = checking group of availability check: 02
D) Carry out for Availability check:
Here we define checking rule for the Availability check & allocate them to the checking group. The checking rules specify the scope of the availability check. For a respective transaction, means which planned receipts & planned issues systems has to taken into consideration and also it determines whether system has to take RLT into consideration.
*Select checking group of availability check-02, checking rule=01
*Go to details icon, & check which planned receipts & planned issues system has taken into consideration for availability check
*save it, exit.
E) Define procedure by Requirement class:
Here we define requirement class whether on availability check & TOR should be carried out the setting that we carries out at requirement class level they are at global level. There settings automatically copied into define from of requirement class and vice versa.
*Choose requirement class: 041 & check availability check & TOR (requirement)
F) Define procedure for each schedule line category:
Here we carry out fine tuning setting for availability check at schedule line category level. Here we define whether system has to carry out Availability check for particular transaction.
Ex: - if we want to implement availability check w/o TOR for a particular transaction. According to settings at requirement class level TOR & availability check function activate & those setting will be copied into the schedule time category by default, so that at schedule line category level we deactivated TOR
G) Determine procedure for each Delivery Item category:
Here we switch on or switch off availability check functions of a delivery item category
*choose item category TAN. & specify the appropriate value.
H) Checking group for updating back orders:
Here we assign checking group to a plant that rule specifies for individual application, according to which the availability check is carried out;
I) Define Default settings:
Here we define the result of the availability check.
*Choose your sales Area, & check fixed dates& Qty options & specify D or E
Where: D- Dialog box in the case of shortages (one time delivery)
E- Dialog box in the shortages (delivery proposal).
rewards if it helps
siva -
Servicegen error with web logic 8.1
hi,
i m getting :
JBServicegenTask:
BUILD FAILED
C:\Documents and Settings\msa6153\jbproject\testwebserviceproj\build.xml:185: Co
uld not create task or type of type: servicegen.
what is getting wrong here ???
The TraderSession example which comes with web logic 8.1 runs fine for servicegen ... this is driving me crazy .. pls help ...
<?xml version="1.0" encoding="UTF-8"?>
<project default="JB_AllServices">
<target name="JBClient1" depends="JBServicegenTask">
<clientgen
ear="C:/Documents and Settings/msa6153/jbproject/testwebserviceproj/TestApp.ear"
warName="WebModule_1.war" serviceName="TestSessionEJB"
packageName="ejb.generated" autotype="true"
clientJar="C:/Documents and Settings/msa6153/jbproject/testwebserviceproj/GeneratedWebServiceClients/TestSessionEJB_client.jar"
overwrite="false" useServerTypes="false"
keepGenerated="true" generateAsyncMethods="false"
saveWsdl="true" j2me="false" useLowerCaseMethodNames="true"
typePackageName="ejb.generated" usePortNameAsMethodName="false">
<classpath>
<pathelement path="C:\Documents and Settings\msa6153\jbproject\testwebserviceproj\classes;D:\bea\weblogic81\server\lib\weblogic_sp.jar;D:\bea\weblogic81\server\lib\weblogic.jar;D:\bea\weblogic81\server\lib\webservices.jar;D:\bea\jdk141_05\jre\lib\charsets.jar;D:\bea\jdk141_05\jre\lib\ext\dnsns.jar;D:\bea\jdk141_05\jre\lib\ext\ldapsec.jar;D:\bea\jdk141_05\jre\lib\ext\localedata.jar;D:\bea\jdk141_05\jre\lib\ext\sunjce_provider.jar;D:\bea\jdk141_05\jre\lib\im\indicim.jar;D:\bea\jdk141_05\jre\lib\jaws.jar;D:\bea\jdk141_05\jre\lib\jce.jar;D:\bea\jdk141_05\jre\lib\jsse.jar;D:\bea\jdk141_05\jre\lib\rt.jar;D:\bea\jdk141_05\jre\lib\sunrsasign.jar;D:\bea\jdk141_05\lib\dt.jar;D:\bea\jdk141_05\lib\htmlconverter.jar;D:\bea\jdk141_05\lib\tools.jar;"/>
</classpath>
</clientgen>
</target>
<target name="JBServicegenTask">
<servicegen
destEar="C:/Documents and Settings/msa6153/jbproject/testwebserviceproj/TestApp.ear"
overwrite="true" warName="WebModule_1.war" keepGenerated="true">
<service
ejbJar="C:/Documents and Settings/msa6153/jbproject/testwebserviceproj/EJBModule_1.jar"
includeEJBs="TestSessionEJB"
serviceName="TestSessionEJB" serviceURI="TestSessionEJB"
targetNamespace="http://ejb" protocol="http"
expandMethods="false" generateTypes="true" style="rpc" useSoap12="false"/>
<classpath>
<pathelement path="C:\Documents and Settings\msa6153\jbproject\testwebserviceproj\classes;D:\bea\weblogic81\server\lib\weblogic_sp.jar;D:\bea\weblogic81\server\lib\weblogic.jar;D:\bea\weblogic81\server\lib\webservices.jar;D:\bea\jdk141_05\jre\lib\charsets.jar;D:\bea\jdk141_05\jre\lib\ext\dnsns.jar;D:\bea\jdk141_05\jre\lib\ext\ldapsec.jar;D:\bea\jdk141_05\jre\lib\ext\localedata.jar;D:\bea\jdk141_05\jre\lib\ext\sunjce_provider.jar;D:\bea\jdk141_05\jre\lib\im\indicim.jar;D:\bea\jdk141_05\jre\lib\jaws.jar;D:\bea\jdk141_05\jre\lib\jce.jar;D:\bea\jdk141_05\jre\lib\jsse.jar;D:\bea\jdk141_05\jre\lib\rt.jar;D:\bea\jdk141_05\jre\lib\sunrsasign.jar;D:\bea\jdk141_05\lib\dt.jar;D:\bea\jdk141_05\lib\htmlconverter.jar;D:\bea\jdk141_05\lib\tools.jar;"/>
</classpath>
</servicegen>
</target>
<target name="JB_AllServices" depends="JBClient1"/>
</project>I got the same error.My task is to create a webservices for a ordinary java class using servicegen ant taski got the error message
Error:couldnot create the task or type of type:servicegen
I use the following solution that is
<taskdef name="servicegen"
classname="weblogic.webservices.servicegen.serviceGenTask"/>
for this i got one error :the <taskdef> doesnot support the nested "servicegen"element.
please anybody clarify the error and also give the procedure of creating a webservices for a simple java class using servicegen ant task
Maybe you are looking for
-
Does EntityManager use the same database connection in a transaction?
Hi All, I have a MDB in which I have created a EntityManager and began a transaction. I have passed this entity manager to all my DAO's via a standard setter method. Now I am wondering if this entity manager uses the same connection all the time unti
-
This is two times now. During auto search download upgrades to org. pgm's i.e. P.S. 2 and now my ORG. Acrobat, your downloads have curcumvented my ability to use MY ORG. Progams in favor of your NEW COSTLY progams. i.e. Some of us OLD SENIOR'S get by
-
Hi, Iam issuing put key command with security level 00 and iam getting error 6A88- reference data not found. Commnad:- 8482 0000 00(Host challenge) - 9000 put key 80D801011D 8210404142434445464748494a4b4c4d4e4f0000 Iam using sec level 00 and iam doin
-
Can't Find Slideshows within Time Machine iPhoto Backup
I have spent quite a lot of time setting up a slideshow with Ken Burns effects and added music. Large slideshow with 367 photos, went to send it to iDVD and it doesn't work...can't export it as it seems it's too large but that is another story (I thi
-
it says I have a vm, a icon shows up but when I dial my voice mail it says I dont have any messages.