I need to add check whether 21 fields of a internal table are empty or not.
Hello,
I need to add check whether 21 fields of a internal table are empty or not.How can we write a code for the same wand what would be the correct syntax for it.
I tried entering all the fields in the IF loop with AND condition but its giving syntax error.Perhaps this is because the lenght of the IF condition would be more than the allowed one.
Hi,
After the select quiery.
If not itab is initial.
Message 'Table is not empty' type 'I'.
Endif.
Regards,
Jagadish.
Similar Messages
-
Need logic to retrieve common fields in two internal tables
Hi,
I need to get the common data from the internnal table IT_BSEG and IT_ZFI_CSHLW_DIRE tables please help me out in sorting out this porblem.
the fields in IT_BSEG are Account number,Profit center,company code,document type etc.
where as the fields in IT_CSHFLW_DIRE are Account number from,Account number to,company code from,company code to and profit center.
so how to check whether a record which is in It_BSEG,exists in IT_CSHFLW_DIRE..?
Thanks,
KumarSolution 1.
LOOP AT ITAB1.
LOOP AT ITAB2
WHERE ( ACCOUNT_FROM LE ITAB1-ACCOUNT AND
ACCOUNT_TO GE ITAB1-ACCOUNT )
AND (COMPANY_FROM LE ITAB1-COMPANY AND
COMPANY_TO GE ITAB1-COMPANY
AND (PROFIT_CENTER EQ LE ITAB1-PROFIT_CENTER ).
<Your logic>.
ENDLOOP.
ENDLOOP.
soultions 2.
RANGES: COMPANY_CODE FOR <Your data dictionary reference>
ACCOUNT FOR <Your data dictionary reference>.
LOOP AT ITAB2.
REFRESH: COMPANY_CODE, ACCOUNT.
CLEAR: COMPANY_CODE, ACCOUNT.
MOVE: I TO COMPANY_CODE-SIGN,
I TO ACCOUNT-SIGN.
MOVE: BT TO COMPANY_CODE-OPTION,
BT TO ACCOUNT-OPTION.
MOVE: ITAB2-COMPANY_FROM TO COMPANY_CODE-LOW,
ITAB2-ACCOUNT_FROM TO ACCOUNT-LOW.
MOVE: ITAB2-COMPANY_TO TO COMPANY_CODE-HIGH.
ITAB2-ACCOUNT_TO TO ACCOUNT-HIGH.
APPEND: COMPANY_CODE, ACCOUNT.
LOOP AT ITAB1 WHERE ACCOUNT IN ACCOUNT "<----range
AND company IN company_code "<----range
AND profit_center eq ITAB2-PROFIT_CENTER.
*<You code>
ENDLOOP.
ENDLOOP.
Please note both approach have different <b>bussines logic</b>.
It depends on your bussiness logic which table data you are looking in which table.
Regards,
A.Singh -
Aggregate a numeric field in an internal table
Hi All,
I have a small requirement in ABAP it goes in this fashion
I need to aggregate a numeric field in an internal table, the table is as follows
FLD1 FLD2 NUM1 FLD3
123A B1 10 C1
123A B1 25 C1
123B B1 20 C2
123C B2 10 C3
Note: FLD1, FLD2, FLD3 are of type numeric characters and NUM1 is of type number or integer
I want the result to be as follows
FLD1 FLD2 NUM1 FLD3
123A B1 35 C1
123B B1 20 C2
123C B2 10 C3
i.e. values in field NUM1 should get add up when the values in all other fields are same
I am not able to use _collect_ for this as the fields contain numeric characters.
Regards and Thanks,
AntonyHi Antony
collect here works like this:-
use at new field
sum
end at.
Pls reward points if it wil be helpful.
Regards
Depanker -
Field catalog & internal table are not mutually convertible
Hi friends,
please help me for this problem, actually i m trying to display three alv reports from the three buttond i have given on my first basic report. its working fine till first & getting the data into the internal table for the second also. but when coming to the field catalog for the second report its giving syntax error as my "field catalog and internal table are not mutually convertible'".i have tried by giving different fieldcatalog also but its giving the same problem.please help for this & try to give an example if u can. Thanks a lot.
Regards
PankajThis is my code :
TABLES: PLAF,
MARA,
MAKT,
AFPO,
T023T,
VSAUFK,
T006A,
MBEW,
ZCDR_D.
Type Pools for ALV *************************
TYPE-POOLS: SLIS,
ABAP.
KKBLO.
DATA DECLARATION. ****************************
DATA: FLAG TYPE I,
FLAG1 TYPE I,
FLAG2 TYPE I,
FLAG3 TYPE I,
FLAG4 TYPE I,
FLAG5 TYPE I.
********Declaration for field catalog
DATA: LAYOUT TYPE SLIS_LAYOUT_ALV,
IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
IT_SORT TYPE SLIS_T_SORTINFO_ALV,
WA_SORT TYPE SLIS_SORTINFO_ALV,
WA_SUBT LIKE SLIS_EV_SUBTOTAL_TEXT,
IT_EVENTS TYPE TABLE OF slis_alv_event WITH NON-UNIQUE DEFAULT KEY
WITH HEADER LINE INITIAL SIZE 0,
WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
LAYOUT1 TYPE SLIS_LAYOUT_ALV,
IT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV,
IT_SORT TYPE SLIS_T_SORTINFO_ALV,
WA_SORT TYPE SLIS_SORTINFO_ALV,
WA_SUBT LIKE SLIS_EV_SUBTOTAL_TEXT,
IT_EVENTS TYPE TABLE OF slis_alv_event WITH NON-UNIQUE DEFAULT KEY
WITH HEADER LINE INITIAL SIZE 0,
WA_FIELDCAT1 TYPE SLIS_FIELDCAT_ALV,
LAYOUT2 TYPE SLIS_LAYOUT_ALV,
IT_FIELDCAT2 TYPE SLIS_T_FIELDCAT_ALV,
IT_SORT TYPE SLIS_T_SORTINFO_ALV,
WA_SORT TYPE SLIS_SORTINFO_ALV,
WA_SUBT LIKE SLIS_EV_SUBTOTAL_TEXT,
IT_EVENTS TYPE TABLE OF slis_alv_event WITH NON-UNIQUE DEFAULT KEY
WITH HEADER LINE INITIAL SIZE 0,
WA_FIELDCAT2 TYPE SLIS_FIELDCAT_ALV,
LAYOUT3 TYPE SLIS_LAYOUT_ALV,
IT_FIELDCAT3 TYPE SLIS_T_FIELDCAT_ALV,
IT_SORT TYPE SLIS_T_SORTINFO_ALV,
WA_SORT TYPE SLIS_SORTINFO_ALV,
WA_SUBT LIKE SLIS_EV_SUBTOTAL_TEXT,
IT_EVENTS TYPE TABLE OF slis_alv_event WITH NON-UNIQUE DEFAULT KEY
WITH HEADER LINE INITIAL SIZE 0,
WA_FIELDCAT3 TYPE SLIS_FIELDCAT_ALV.
TYPES DECLARATION. ****************************
TYPES: BEGIN OF TY_MARA,
MATNR LIKE MARA-MATNR, " Material Number
MATKL LIKE MARA-MATKL, " Material Group
END OF TY_MARA.
TYPES: BEGIN OF TY_PLAF,
PERTR LIKE PLAF-PERTR, " Date
PLNUM LIKE PLAF-PLNUM, " Planned Order Number
MATNR LIKE PLAF-MATNR, " Material number
PLWRK LIKE PLAF-PLWRK, " Plant
KDAUF LIKE PLAF-KDAUF, " Sales Order Number
KDPOS LIKE PLAF-KDPOS, " SO Line Item
END OF TY_PLAF.
TYPES: BEGIN OF TY_MAKT,
MATNR LIKE PLAF-MATNR, " Material Number
MAKTX LIKE MAKT-MAKTX, " Material Description
END OF TY_MAKT.
TYPES: BEGIN OF TY_AFPO,
PLNUM LIKE AFPO-PLNUM, " Planned Order Number
MATNR LIKE AFPO-MATNR, " Material Number
KDAUF LIKE AFPO-KDAUF, " Sales Order Number
KDPOS LIKE AFPO-KDPOS, " SO Line Item
AUFNR LIKE AFPO-AUFNR, " Production Order
STRMP LIKE AFPO-STRMP,
DWERK LIKE AFPO-DWERK,
END OF TY_AFPO.
TYPES: BEGIN OF TY_ZCDR_D,
MANDT LIKE ZCDR_D-MANDT, " Client
CBNO LIKE ZCDR_D-CBNO, " Customs Book Number
PLNUM LIKE ZCDR_D-PLNUM, " Planned Order Number
MATNR LIKE ZCDR_D-MATNR, " Material Number
MAKTX LIKE ZCDR_D-MAKTX, " Material Description
KDAUF like ZCDR_D-KDAUF, " Sales Order Number
KDPOS like ZCDR_D-KDPOS, " SO Line Item
AUFNR LIKE ZCDR_D-AUFNR, " Production Order
END OF TY_ZCDR_D.
TYPES: BEGIN OF TY_VSAUFK,
INACT LIKE VSAUFK-INACT, " Status Indicator
END OF TY_VSAUFK.
TYPES: BEGIN OF TY_PLAF_MAKT,
CBNO LIKE ZCDR_D-CBNO, " Customs Book Number
PLNUM LIKE PLAF-PLNUM, " Planned Order Number
CHK TYPE C, " Check Box
MATNR LIKE PLAF-MATNR, " Material Number
MAKTX LIKE MAKT-MAKTX, " Material Description
KDAUF LIKE PLAF-KDAUF, " Sales Order Number
KDPOS LIKE PLAF-KDPOS, " SO Line Item
AUFNR LIKE AFPO-AUFNR, " Production Order
END OF TY_PLAF_MAKT.
TYPES: BEGIN OF TY_HELP_ITEM,
CBNO TYPE ZCDR_D-CBNO, " Customs Book Number
PLNUM LIKE ZCDR_D-PLNUM, " Planned Order Number
MATNR LIKE ZCDR_D-MATNR, " Material Number
MAKTX LIKE ZCDR_D-MAKTX, " Material Description
KDAUF LIKE ZCDR_D-KDAUF, " Sales Order Number
KDPOS LIKE ZCDR_D-KDPOS, " SO Line Item
AUFNR LIKE ZCDR_D-AUFNR, " Production Order
END OF TY_HELP_ITEM.
WORK AREA ******************************
DATA: WA_MARA TYPE TY_MARA,
WA_PLAF TYPE TY_PLAF,
WA_MAKT TYPE TY_MAKT,
WA_AFPO TYPE TY_AFPO,
WA_ZCDR_D TYPE TY_ZCDR_D,
WA_VSAUFK TYPE TY_VSAUFK,
WA_PLAF_MAKT TYPE TY_PLAF_MAKT,
WA_HELP_ITEM TYPE TY_HELP_ITEM.
INTERNAL TABLES ****************************
DATA: IT_MARA TYPE TABLE OF TY_MARA,
IT_PLAF TYPE TABLE OF TY_PLAF,
IT_MAKT TYPE TABLE OF TY_MAKT,
IT_AFPO TYPE TABLE OF TY_AFPO,
IT_ZCDR_D TYPE TABLE OF TY_ZCDR_D,
IT_VSAUFK TYPE TABLE OF TY_VSAUFK,
IT_PLAF_MAKT TYPE TABLE OF TY_PLAF_MAKT,
IT_HELP_ITEM TYPE TABLE OF TY_HELP_ITEM.
*it_events TYPE TABLE OF slis_alv_event WITH NON-UNIQUE DEFAULT KEY
*WITH HEADER LINE INITIAL SIZE 0.
TYPES: BEGIN OF TY_BOM,
MATMK LIKE STPOX-MATMK,
MTNRV LIKE ZCDR_D-MATNR,
IDNRK LIKE STPOX-IDNRK,
MNGLG LIKE STPOX-MNGLG,
MMEIN LIKE STPOX-MMEIN,
VPRSV LIKE STPOX-VPRSV,
UPRICE LIKE MBEW-STPRS,
TPRICE LIKE MBEW-STPRS,
END OF TY_BOM,
BEGIN OF TY_QUAN,
MATMK LIKE STPOX-MATMK,
MTNRV LIKE ZCDR_D-MATNR,
IDNRK LIKE STPOX-IDNRK,
MNGLG LIKE STPOX-MNGLG,
MMEIN LIKE STPOX-MMEIN,
UPRICE LIKE MBEW-STPRS,
TPRICE LIKE MBEW-STPRS,
END OF TY_QUAN,
BEGIN OF TY_T023T,
MATKL LIKE T023T-MATKL,
WGBEZ LIKE T023T-WGBEZ,
END OF TY_T023T,
BEGIN OF TY_T006A,
MMEIN LIKE T006A-MSEHI,
MSEHT LIKE T006A-MSEHT,
END OF TY_T006A,
BEGIN OF TY_IMP_FINAL,
SNO TYPE SY-INDEX,
HSCODE LIKE ZHSCODE-HSCODE,
WGBEZ TYPE T023T-WGBEZ,
SPEC(20) TYPE C,
MNGLG LIKE STPOX-MNGLG,
MSEHT LIKE T006A-MSEHT,
CNTRY(13) TYPE C,
UPRICE TYPE P LENGTH 16 DECIMALS 2,
TPRICE TYPE P LENGTH 16 DECIMALS 2,
CURRCODE TYPE C LENGTH 5,
END OF TY_IMP_FINAL,
BEGIN OF TY_MBEW,
MATNR LIKE MBEW-MATNR,
VPRSV LIKE MBEW-VPRSV,
STPRS LIKE MBEW-STPRS,
VERPR LIKE MBEW-VERPR,
END OF TY_MBEW.
DATA: WA_BOM TYPE TY_BOM,
WA_QUAN TYPE TY_QUAN,
WA_IMP_FINAL TYPE TY_IMP_FINAL,
WA_T023T TYPE TY_T023T,
WA_T006A TYPE TY_T006A,
WA_MBEW TYPE TY_MBEW.
DATA: IT_BOM TYPE TABLE OF TY_BOM,
IT_QUAN TYPE TABLE OF TY_QUAN,
IT_IMP_FINAL TYPE TABLE OF TY_IMP_FINAL,
IT_MBEW TYPE TABLE OF TY_MBEW.
SELECTION-SCREEN **************************
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-001.
PARAMETERS : PR_CBNO LIKE ZCDR_D-CBNO OBLIGATORY. "Customs Book number
SELECTION-SCREEN END OF BLOCK b1.
INITIALIZATION **************************
INITIALIZATION.
**PERFORM CLEAR_DATA.
**CLEAR: wa_layout.
*PERFORM set_events USING it_events[].
SELECT OPTION ****************************************
SELECTION-SCREEN : BEGIN OF BLOCK BLK WITH FRAME TITLE TEXT-002.
SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS:
SO_PERTR for PLAF-PERTR, "----
Date
SO_MATNR for MARA-MATNR, "----
Material
SO_MATKL for MARA-MATKL, "----
Material Group
SO_PLWRK for PLAF-PLWRK OBLIGATORY, "----
Plant
SO_KDAUF for PLAF-KDAUF. "----
Sales Order
SELECTION-SCREEN : END OF BLOCK BLK.
SELECTION SCREEN F4 HELP *********************
AT SELECTION-SCREEN ON VALUE-REQUEST FOR PR_CBNO.
DATA: DYNFIELDS TYPE TABLE OF DYNPREAD WITH HEADER LINE.
DYNFIELDS-FIELDNAME = PR_CBNO.
APPEND DYNFIELDS.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = SY-CPROG
DYNUMB = SY-DYNNR
TRANSLATE_TO_UPPER = 'X'
REQUEST = ' '
PERFORM_CONVERSION_EXITS = ' '
PERFORM_INPUT_CONVERSION = ' '
DETERMINE_LOOP_INDEX = ' '
START_SEARCH_IN_CURRENT_SCREEN = ' '
START_SEARCH_IN_MAIN_SCREEN = ' '
START_SEARCH_IN_STACKED_SCREEN = ' '
START_SEARCH_ON_SCR_STACKPOS = ' '
SEARCH_OWN_SUBSCREENS_FIRST = ' '
SEARCHPATH_OF_SUBSCREEN_AREAS = ' '
TABLES
DYNPFIELDS = DYNFIELDS
EXCEPTIONS
INVALID_ABAPWORKAREA = 1
INVALID_DYNPROFIELD = 2
INVALID_DYNPRONAME = 3
INVALID_DYNPRONUMMER = 4
INVALID_REQUEST = 5
NO_FIELDDESCRIPTION = 6
INVALID_PARAMETER = 7
UNDEFIND_ERROR = 8
DOUBLE_CONVERSION = 9
STEPL_NOT_FOUND = 10
OTHERS = 11
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE DYNFIELDS WITH KEY FIELDNAME = 'CBNO'.
PR_CBNO = DYNFIELDS-FIELDVALUE.
SELECT
CBNO
PLNUM
MATNR
MAKTX
KDAUF
KDPOS
AUFNR
FROM ZCDR_D
INTO TABLE IT_HELP_ITEM .
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'CBNO'
PVALKEY = ' '
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
DYNPROFIELD = 'PR_CBNO'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT_HELP_ITEM
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
***********************SELECTION SCREEN VALIDATION.*******************
AT SELECTION-SCREEN ON PR_CBNO.
SELECT SINGLE *
FROM ZCDR_D
WHERE CBNO = PR_CBNO.
IF SY-SUBRC EQ 0.
MESSAGE E000(ZCBR) WITH PR_CBNO.
ENDIF.
AT SELECTION-SCREEN ON SO_PERTR.
IF SO_PERTR IS NOT INITIAL.
SELECT SINGLE *
FROM PLAF
WHERE PERTR IN SO_PERTR.
IF SY-SUBRC NE 0.
MESSAGE W001(ZCBR) WITH SO_PERTR-LOW.
ENDIF.
ENDIF.
AT SELECTION-SCREEN ON SO_MATNR.
IF SO_MATNR IS NOT INITIAL.
SELECT SINGLE *
FROM MARA
WHERE MATNR IN SO_MATNR.
IF SY-SUBRC NE 0.
MESSAGE W002(ZCBR) WITH SO_MATNR-LOW.
ENDIF.
ENDIF.
AT SELECTION-SCREEN ON SO_MATKL.
IF SO_MATKL IS NOT INITIAL.
SELECT SINGLE *
FROM MARA
WHERE MATKL IN SO_MATKL.
IF SY-SUBRC NE 0.
MESSAGE W003(ZCBR) WITH SO_MATKL-LOW.
ENDIF.
ENDIF.
AT SELECTION-SCREEN ON SO_PLWRK.
IF SO_PLWRK IS NOT INITIAL.
SELECT SINGLE * FROM PLAF
WHERE PLWRK IN SO_PLWRK.
IF SY-SUBRC NE 0.
MESSAGE W004(ZCBR) WITH SO_PLWRK-LOW.
ENDIF.
ENDIF.
AT SELECTION-SCREEN ON SO_KDAUF.
IF SO_KDAUF IS NOT INITIAL.
SELECT SINGLE * FROM PLAF
WHERE KDAUF IN SO_KDAUF.
IF SY-SUBRC NE 0.
MESSAGE W005(ZCBR) WITH SO_KDAUF-LOW.
ENDIF.
ENDIF.
*********************START-OF-SELECTION.*****************************
START-OF-SELECTION.
IF so_pertr IS NOT INITIAL.
FLAG = 1.
ENDIF.
IF SO_MATNR IS NOT INITIAL.
FLAG1 = 1.
ENDIF.
IF so_matkl IS NOT INITIAL.
FLAG2 = 1.
ENDIF.
IF so_plwrk IS NOT INITIAL.
FLAG3 = 1.
ENDIF.
IF so_kdauf IS NOT INITIAL.
FLAG4 = 1.
ENDIF.
Select data into its internal table from different database tables
SELECT
MATNR
MATKL
MTART
INTO CORRESPONDING FIELDS OF TABLE IT_MARA
FROM MARA
WHERE MTART = 'ZFGS'.
IF FLAG2 NE 0.
DELETE IT_MARA WHERE
NOT ( MATKL IN SO_MATKL )
ENDIF.
IF FLAG1 NE 0.
DELETE IT_MARA WHERE
NOT ( MATNR IN SO_MATNR )
ENDIF.
SELECT
PERTR
PLNUM
MATNR
PLWRK
KDAUF
KDPOS
FROM PLAF
INTO CORRESPONDING FIELDS OF TABLE IT_PLAF
FOR ALL ENTRIES IN IT_MARA
WHERE PLWRK IN SO_PLWRK
AND MATNR = IT_MARA-MATNR.
SELECT
MATNR
PLNUM
AUFNR
KDAUF
KDPOS
STRMP
DWERK
INACT
FROM AFPO
INTO CORRESPONDING FIELDS OF TABLE IT_AFPO
FOR ALL ENTRIES IN IT_MARA
WHERE DWERK IN SO_PLWRK
AND MATNR = IT_MARA-MATNR.
WHERE MATNR = IT_MARA-MATNR
AND STRMP = IT_PLAF-PERTR
AND KDAUF = IT_PLAF-KDAUF
AND DWERK = IT_PLAF-PLWRK.
End of Data selection
Keep only those records which the user wants from his selection screen
IF FLAG NE 0.
DELETE IT_PLAF WHERE
NOT ( PERTR IN SO_PERTR )
DELETE IT_AFPO WHERE
NOT ( STRMP IN SO_PERTR )
ENDIF.
IF FLAG3 NE 0.
DELETE IT_PLAF WHERE
NOT ( PLWRK IN SO_PLWRK )
DELETE IT_AFPO WHERE
NOT ( DWERK IN SO_PLWRK )
ENDIF.
IF FLAG4 NE 0.
DELETE IT_PLAF WHERE
NOT ( KDAUF IN SO_KDAUF )
DELETE IT_AFPO WHERE
NOT ( KDAUF IN SO_KDAUF )
ENDIF.
SELECT
MATNR
MAKTX
FROM MAKT
INTO CORRESPONDING FIELDS OF TABLE IT_MAKT
FOR ALL ENTRIES IN IT_PLAF
WHERE MATNR = IT_PLAF-MATNR
AND SPRAS = 'EN'.
SELECT
FROM ZCDR_D
INTO TABLE IT_ZCDR_D.
Put data into final internal table from different internal tables
LOOP AT IT_MARA INTO WA_MARA.
LOOP AT IT_PLAF INTO WA_PLAF WHERE MATNR = WA_MARA-MATNR.
READ TABLE IT_ZCDR_D
INTO WA_ZCDR_D
WITH KEY PLNUM = WA_PLAF-PLNUM.
IF SY-SUBRC <> 0.
MOVE WA_PLAF-PLNUM TO WA_PLAF_MAKT-PLNUM.
MOVE WA_PLAF-MATNR TO WA_PLAF_MAKT-MATNR.
MOVE WA_PLAF-KDAUF TO WA_PLAF_MAKT-KDAUF.
MOVE WA_PLAF-KDPOS TO WA_PLAF_MAKT-KDPOS.
READ TABLE IT_AFPO INTO WA_AFPO WITH KEY PLNUM = WA_PLAF-PLNUM.
MOVE WA_AFPO-AUFNR TO WA_PLAF_MAKT-AUFNR.
SELECT
SINGLE * FROM VSAUFK
INTO TABLE IT_VSAUFK
WHERE AUFNR = WA_AFPO-AUFNR
AND STAT = 'I0012'.
IF SY-SUBRC <> 0.
MOVE WA_AFPO-AUFNR TO IT_PLAF_MAKT-AUFNR.
ELSE.
CHECK IT_VSAUFK-INACT = 'X'.
MOVE WA_AFPO-AUFNR TO IT_PLAF_MAKT-AUFNR.
ENDIF.
ENDLOOP.
READ TABLE IT_MAKT
INTO WA_MAKT
WITH KEY MATNR = WA_MARA-MATNR.
MOVE WA_MAKT-MAKTX TO WA_PLAF_MAKT-MAKTX.
APPEND WA_PLAF_MAKT TO IT_PLAF_MAKT.
CLEAR WA_PLAF_MAKT.
ENDIF.
ENDLOOP.
ENDLOOP.
LOOP AT IT_PLAF_MAKT .
LOOP AT IT_MARA INTO WA_MARA.
LOOP AT IT_PLAF INTO WA_PLAF WHERE MATNR = WA_MARA-MATNR.
LOOP AT IT_AFPO INTO WA_AFPO WHERE MATNR = WA_MARA-MATNR.
READ TABLE IT_ZCDR_D
INTO WA_ZCDR_D
WITH KEY PLNUM = WA_AFPO-PLNUM.
IF SY-SUBRC <> 0.
LOOP AT IT_AFPO INTO WA_AFPO.
WHERE MATNR IN SO_MATNR
AND STRMP = SO_PERTR
AND PLNUM IN SO_PLNUM
AND KDAUF IN SO_-KDAUF
AND MATKL IN SO_MATKL.
SELECT
SINGLE INACT FROM VSAUFK
INTO WA_VSAUFK
WHERE AUFNR = WA_AFPO-AUFNR
AND STAT = 'I0012'.
IF SY-SUBRC <> 0.
WA_PLAF_MAKT-PLNUM = WA_AFPO-PLNUM.
WA_PLAF_MAKT-KDAUF = WA_AFPO-KDAUF.
WA_PLAF_MAKT-KDPOS = WA_AFPO-KDPOS.
WA_PLAF_MAKT-MATNR = WA_AFPO-MATNR.
WA_PLAF_MAKT-AUFNR = WA_AFPO-AUFNR.
READ TABLE IT_MAKT INTO WA_MAKT WITH KEY MATNR = WA_AFPO-MATNR.
WA_PLAF_MAKT-MAKTX = WA_MAKT-MAKTX.
APPEND WA_PLAF_MAKT TO IT_PLAF_MAKT .
APPEND WA_AFPO TO IT_PLAF_MAKT.
MOVE WA_AFPO-AUFNR TO IT_PLAF_MAKT-AUFNR.
ELSE.
CHECK WA_VSAUFK-INACT = 'X'.
WA_PLAF_MAKT-PLNUM = WA_AFPO-PLNUM.
WA_PLAF_MAKT-KDAUF = WA_AFPO-KDAUF.
WA_PLAF_MAKT-KDPOS = WA_AFPO-KDPOS.
WA_PLAF_MAKT-MATNR = WA_AFPO-MATNR.
WA_PLAF_MAKT-AUFNR = WA_AFPO-AUFNR.
READ TABLE IT_MAKT INTO WA_MAKT WITH KEY MATNR = WA_AFPO-MATNR.
WA_PLAF_MAKT-MAKTX = WA_MAKT-MAKTX.
APPEND WA_PLAF_MAKT TO IT_PLAF_MAKT .
APPEND WA_AFPO TO IT_PLAF_MAKT.
MOVE WA_AFPO-AUFNR TO IT_PLAF_MAKT-AUFNR.
ENDIF.
ENDIF.
ENDLOOP.
EXIT.
ENDIF.
ENDLOOP.
ENDLOOP.
LOOP AT IT_PLAF_MAKT INTO WA_PLAF_MAKT.
WA_PLAF_MAKT-CBNO = PR_CBNO.
MODIFY IT_PLAF_MAKT FROM WA_PLAF_MAKT TRANSPORTING CBNO.
ENDLOOP.
ENDLOOP.
PERFORM CHANGE_CATALOG.
PERFORM ALV_DISPLAY.
*& Form CHANGE_CATALOG
text
FORM CHANGE_CATALOG.
LAYOUT-ZEBRA = 'X'.
DATA: L_POS TYPE I.
L_POS = L_POS + 1.
WA_FIELDCAT-col_pos = L_POS.
WA_FIELDCAT-SELTEXT_M = 'Planned Order Nos.'.
WA_FIELDCAT-TABNAME = WA_PLAF_MAKT.
WA_FIELDCAT-FIELDNAME = 'PLNUM'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
L_POS = L_POS + 1.
WA_FIELDCAT-COL_POS = L_POS.
WA_FIELDCAT-INPUT = 'X'.
WA_FIELDCAT-SELTEXT_M = 'Check Box'.
WA_FIELDCAT-TABNAME = WA_PLAF_MAKT.
WA_FIELDCAT-CHECKBOX = 'X'.
WA_FIELDCAT-EDIT = abap_true.
WA_FIELDCAT-FIELDNAME = 'CHK'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
L_POS = L_POS + 1.
WA_FIELDCAT-COL_POS = L_POS.
WA_FIELDCAT-OUTPUTLEN = '12'.
WA_FIELDCAT-SELTEXT_M = 'Material'.
WA_FIELDCAT-TABNAME = WA_PLAF_MAKT.
WA_FIELDCAT-FIELDNAME = 'MATNR'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
L_POS = L_POS + 1.
WA_FIELDCAT-COL_POS = L_POS.
WA_FIELDCAT-OUTPUTLEN = '35'.
WA_FIELDCAT-SELTEXT_M = 'Material Description'.
WA_FIELDCAT-TABNAME = WA_PLAF_MAKT.
WA_FIELDCAT-FIELDNAME = 'MAKTX'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
L_POS = L_POS + 1.
WA_FIELDCAT-COL_POS = L_POS.
WA_FIELDCAT-SELTEXT_M = 'Sales Order Number'.
WA_FIELDCAT-TABNAME = WA_PLAF_MAKT.
WA_FIELDCAT-FIELDNAME = 'KDAUF'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
L_POS = L_POS + 1.
WA_FIELDCAT-COL_POS = L_POS.
WA_FIELDCAT-SELTEXT_M = 'S O Line Item'.
WA_FIELDCAT-TABNAME = WA_PLAF_MAKT.
WA_FIELDCAT-FIELDNAME = 'KDPOS'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
L_POS = L_POS + 1.
WA_FIELDCAT-COL_POS = L_POS.
WA_FIELDCAT-OUTPUTLEN = '13'.
WA_FIELDCAT-SELTEXT_M = 'Production Order'.
WA_FIELDCAT-TABNAME = WA_PLAF_MAKT.
WA_FIELDCAT-FIELDNAME = 'AUFNR'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
*GS_LAYOUT-TOTALS_BEFORE_ITEMS = 'X'.
*data : text like slis_ev_subtotal_text value 'total'.
*gs_layout-subtotals_text = text.
*gs_layout-totals_only = 'X'.
gs_layout-subtotals_text = 'total'.
endform. " CHANGE_CATALOG
*********************event*************************************
*& Form ALV_DISPLAY
text
FORM ALV_DISPLAY.
*data: LC_GLAY TYPE LVC_S_GLAY.
LC_GLAY-EDT_CLL_CB = 'X'.
gs_layout-colwidth_optimize = 'X'.
gs_layout-zebra = 'X'.
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 = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = '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 = 'PLANNED ORDERS'
I_GRID_SETTINGS = LC_GLAY
IS_LAYOUT = LAYOUT
IT_FIELDCAT = IT_FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'X'
IS_VARIANT =
IT_EVENTS = IT_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_IT_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_PLAF_MAKT
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.
REFRESH IT_FIELDCAT[].
ENDFORM. "ALV_DISPLAY
*& Form USER_COMMAND
text
-->UCOMM text
-->SELFIELD text
FORM USER_COMMAND
USING UCOMM LIKE SY-UCOMM
SELFIELD TYPE SLIS_SELFIELD.
Data: REF1 TYPE REF TO CL_GUI_ALV_GRID.
DATA WA LIKE LINE OF IT_PLAF_MAKT.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
E_GRID = REF1.
CALL METHOD REF1->CHECK_CHANGED_DATA.
CASE UCOMM.
WHEN '&BACK'.
LEAVE TO SCREEN 0.
WHEN '&EXIT'.
LEAVE TO SCREEN 0.
WHEN '&CANC'.
LEAVE TO SCREEN 0.
WHEN '&SAVE'.
CLEAR IT_ZCDR_D[].
LOOP AT IT_PLAF_MAKT INTO WA_PLAF_MAKT WHERE CHK = 'X'.
CLEAR WA_ZCDR_D.
WA_ZCDR_D-MANDT = SY-MANDT.
WA_ZCDR_D-CBNO = WA_PLAF_MAKT-CBNO.
WA_ZCDR_D-plnum = WA_PLAF_MAKT-PLNUM.
WA_ZCDR_D-MATNR = WA_PLAF_MAKT-MATNR.
WA_ZCDR_D-MAKTX = WA_PLAF_MAKT-MAKTX.
WA_ZCDR_D-KDAUF = WA_PLAF_MAKT-KDAUF.
WA_ZCDR_D-KDPOS = WA_PLAF_MAKT-KDPOS.
WA_ZCDR_D-AUFNR = WA_PLAF_MAKT-AUFNR.
APPEND WA_ZCDR_D to IT_ZCDR_D.
ENDLOOP.
LOOP AT IT_ZCDR_D INTO WA_ZCDR_D.
INSERT ZCDR_D FROM WA_ZCDR_D.
CLEAR WA_ZCDR_D.
ENDLOOP.
IF SY-SUBRC EQ 0.
MESSAGE S021(ZCBR) WITH PR_CBNO.
ENDIF.
IF IT_ZCDR_D IS INITIAL.
MESSAGE 'Select Atleast one Check Box' TYPE 'E' .
ENDIF.
WHEN 'IMPORT_INF'.
PERFORM IMPORT_REPORT.
WHEN 'EXPORT_INF'.
PERFORM EXPORT_REPORT.
WHEN 'UNIT_CONSU'.
PERFORM UNIT_CONSUMPTION.
ENDCASE.
ENDFORM. "USER_COMMAND
FORM set_events USING it_events TYPE slis_t_event.
DATA: x_event TYPE slis_alv_event.
clear x_event.
x_event-name = 'USER_COMMAND'.
x_event-form = 'USER_COMMAND'.
append x_event to it_events.
CLEAR x_event.
call function 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = IT_EVENTS
EXCEPTIONS
LIST_TYPE_WRONG = 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.
read table it_events into x_event with key name = slis_ev_user_command.
if sy-subrc = 0.
x_event-form = 'USER_COMMAND'.
modify it_events from x_event index sy-tabix transporting form .
endif.
ENDFORM.
*& Form set_pf_status
text
-->RT_EXTAB text
FORM SET_PF_STATUS USING RT_EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'Z_PFSTAT'.
ENDFORM. " set_pf_status
FORM IMPORT_REPORT.
TYPES: BEGIN OF TY_BOM,
MATMK LIKE STPOX-MATMK,
MTNRV LIKE ZCDR_D-MATNR,
IDNRK LIKE STPOX-IDNRK,
MNGLG LIKE STPOX-MNGLG,
MMEIN LIKE STPOX-MMEIN,
VPRSV LIKE STPOX-VPRSV,
UPRICE LIKE MBEW-STPRS,
TPRICE LIKE MBEW-STPRS,
END OF TY_BOM,
BEGIN OF TY_QUAN,
MATMK LIKE STPOX-MATMK,
MTNRV LIKE ZCDR_D-MATNR,
IDNRK LIKE STPOX-IDNRK,
MNGLG LIKE STPOX-MNGLG,
MMEIN LIKE STPOX-MMEIN,
UPRICE LIKE MBEW-STPRS,
TPRICE LIKE MBEW-STPRS,
END OF TY_QUAN,
BEGIN OF TY_T023T,
MATKL LIKE T023T-MATKL,
WGBEZ LIKE T023T-WGBEZ,
END OF TY_T023T,
BEGIN OF TY_T006A,
MMEIN LIKE T006A-MSEHI,
MSEHT LIKE T006A-MSEHT,
END OF TY_T006A,
BEGIN OF TY_IMP_FINAL,
SNO TYPE SY-INDEX,
HSCODE LIKE ZHSCODE-HSCODE,
WGBEZ TYPE T023T-WGBEZ,
SPEC(20) TYPE C,
MNGLG LIKE STPOX-MNGLG,
MSEHT LIKE T006A-MSEHT,
CNTRY(13) TYPE C,
UPRICE TYPE P LENGTH 16 DECIMALS 2,
TPRICE TYPE P LENGTH 16 DECIMALS 2,
CURRCODE TYPE C LENGTH 5,
END OF TY_IMP_FINAL,
BEGIN OF TY_MBEW,
MATNR LIKE MBEW-MATNR,
VPRSV LIKE MBEW-VPRSV,
STPRS LIKE MBEW-STPRS,
VERPR LIKE MBEW-VERPR,
END OF TY_MBEW.
DATA: WA_BOM TYPE TY_BOM,
WA_QUAN TYPE TY_QUAN,
WA_IMP_FINAL TYPE TY_IMP_FINAL,
WA_T023T TYPE TY_T023T,
WA_T006A TYPE TY_T006A,
WA_MBEW TYPE TY_MBEW.
DATA: IT_BOM TYPE TABLE OF TY_BOM,
IT_QUAN TYPE TABLE OF TY_QUAN,
IT_IMP_FINAL TYPE TABLE OF TY_IMP_FINAL,
IT_MBEW TYPE TABLE OF TY_MBEW.
DATA: IT_STPO TYPE STANDARD TABLE OF STPOX,
WA_STPO TYPE STPOX.
SELECT
MATNR
VPRSV
STPRS
VERPR
FROM MBEW
INTO CORRESPONDING FIELDS OF TABLE IT_MBEW.
WHERE MATNR EQ IT_MARA-MATNR. "MBEW
*I_STPO2 TYPE STANDARD TABLE OF STPOX.
LOOP AT IT_PLAF_MAKT INTO WA_PLAF_MAKT WHERE CHK = 'X'.
LOOP AT IT_ZCDR_D INTO WA_ZCDR_D .
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2' -
Need to add a new field to XD01 under company code data tab
Hi,
I need to add a new field under Company code data of XD01 under Account Management tab.
I came to know two BADI's CUSTOMER_ADD_DATA and CUSTOMER_ADD_DATA_CS can be used for this. But for these BADIs we need to create a sub screen.But for my requirement I need not use a subscreen just to add a field.
Please let me know how to do this?Hello Pavan,
Do you have any solution for this issue? I only can creat a new tab but hi prefer as you, creat a field Company code data of XD01 under Account Management tab.
I read that is not possible, this is true?
Best Regards,
Eduardo Paiva -
I need to add a single field from with_item table . need to write select query with reference to company code , account doc no , fiscal year
Hi Arun ,
Can you explain little bit more ??
what is account doc no?
what are the transactions should be displayed in your output??
-Rajesh N -
How to use OMJX transaction? Need to add an additional field on MIGO item
hi guys
we need to add a new field on the MIGO screen at the item level. We are trying to explore OMJX to add custom fields.
We have used append structutre to enhance the GOITEM structure but are not clear on how to use OMJX.
ANy idea how to use the transaction OMJX.
Thanks in advanceWith the Business Add-In (BAdI) MB_MIGO_BADI, you can extend the
interface of the goods movements transaction (MIGO) with additional
tabstrip controls for the detailed information (detail tabstrips) and
header information (header tabstrips). It is possible for an external
application
o to display an additional detail tabstrip with own subscreen (max. 10
lines) in MIGO
o to display an additional header tabstrip with own subscreen (max. 3
lines) in MIGO
The program name, screen number and tab page text can be determined
dynamically. Different screens can therefore be controlled according to
the mode (for example, change mode, display mode, goods receipt, goods
issue).
Pushbuttons
It is not possible to implement pushbuttons in the MIGO menu, but you
can, however, implement pushbuttons directly on the external subscreen.
The OK code from MIGO is forwarded to the external application so it can
react.
Cursor Control
So that the cursor stays on the same subscreen after you press Continue,
if it was positioned there before, the external application in the own
PAI must hold the cursor positioning (on the same screen 'yes'/'no'; if
'yes', on which field), to set the cursor in PBO again.
Requirements
If you use the BAdI MB_MIGO_BADI in MIGO to update customer-own data, in
addition to the material document, to the database, you should note the
following:
o The BAdI MB_MIGO_BADI is only active in transaction MIGO.
o If you post goods movements with other transactions (for example, with
MB01, MB1C, VL02N), you must ensure that customer data is also
updated, if necessary.
You can do this by using the BAdI MB_DOCUMENT_BADI (Creating a
material document) to post the goods movements with the transactions
mentioned above.
o Note that otherwise, posting the goods movements will lead to
inconsistencies between SAP system data (for example, in stocks,
material documents, FI documents) and customer data. -
Infocube and ODS populated with DATA (need to add one more field?)
Hi,
If infocube and ODS have been populated with data for past 3 months. Then we need to add one more field to this cube. What is the impact? Please advise.
The following is my understanding. Please correct me if I am wrong.
1) Need to delete content of ODS and infocube.
2) insert the new field at ODS and infocube.
3) reload the data into ODS and infocube.
Is there a way that the current data need not be deleted.
Just add in this new field and only subsequent month, infocube will have this new field? Please advise what is the best approach without affecting existing data.Hi,
Siggi is right. You dont need to delete the previously loaded data to CUBE or ODS. The only catch is that, your new field will be empty as far as history is concerned. But so long as you did map it to the datasource and the datasource is able to fill it up, then your new field will now have value for incoming DELTA Updates.
Addition of a field is not that complicated compared to deletion of a field from CUBE or ODS.
--Jkyle -
Add field in an internal table
Hi There,
How to add a field in an internal table created at the runtime using
CREATE DATA D1 TYPE TABLE OF (VAR).
where say var contains name of a DDIC table.
Rgds,
deb.after creating internal table use the method for creation of dynamic table and try , i am not sure
DATA: LineType TYPE string,
ItabRef TYPE REF TO DATA.
FIELD-SYMBOLS: TYPE STANDARD TABLE.
LineType = 'SFLIGHT'.
" Create internal table and attach a field-symbol
CREATE DATA ItabRef TYPE STANDARD TABLE OF (LineType).
ASSIGN ItabRef->* TO .
<b>after this check this and try</b>
******DATA DECLARATION*****************************
FIELD-SYMBOLS : <it_final> TYPE STANDARD TABLE,
<wa_final> TYPE ANY,
<w_field> TYPE ANY.
***DYNAMIC CREATION OF FIELDCATALOG****************
*FIRST 2 FIELDS FIELDS FIELD1 AND FIELD2 ARE CONSTANT, FIELDS OBTAINED IN THE LOOP ENDLOOP ARE DYNAMIC,
*LIKEWISE DYNAMIC FIELDCATALOG IS CREATED
wa_fieldcatalog-fieldname = 'FIELD1'.
wa_fieldcatalog-ref_table = 'E070'.
wa_fieldcatalog-outputlen = '13'.
wa_fieldcatalog-reptext = 'Created On'.
wa_fieldcatalog-seltext = 'Created On'.
APPEND wa_fieldcatalog TO it_fieldcatalog.
CLEAR wa_fieldcatalog.
wa_fieldcatalog-fieldname = 'FIELD1'.
wa_fieldcatalog-ref_table = 'E070'.
wa_fieldcatalog-outputlen = '13'.
wa_fieldcatalog-reptext = 'Created On'.
wa_fieldcatalog-seltext = 'Created On'.
APPEND wa_fieldcatalog TO it_fieldcatalog.
CLEAR wa_fieldcatalog.
LOOP AT it_mandt WHERE mandt IN s_mandt.
CONCATENATE 'CLNT' it_mandt INTO wa_fieldcatalog-fieldname.
wa_fieldcatalog-inttype = 'NUMC'.
wa_fieldcatalog-outputlen = '14'.
wa_fieldcatalog-reptext = it_mandt.
wa_fieldcatalog-seltext = it_mandt.
APPEND wa_fieldcatalog TO it_fieldcatalog.
CLEAR :wa_fieldcatalog ,it_mandt.
ENDLOOP.
********CREATE DYNAMIC TABLE************************
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fieldcatalog
IMPORTING
ep_table = new_table
EXCEPTIONS
generate_subpool_dir_full = 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.
ASSIGN new_table->* TO <it_final>.
*********CREATE WORK AREA****************************
CREATE DATA new_line LIKE LINE OF <it_final>.
ASSIGN new_line->* TO <wa_final>.
*********INSERTTING WORK AREAR TO INTERNAL TABLE******
INSERT <wa_final> INTO TABLE <it_final>.
*******POPULATING DATA*******************************
LOOP.
ASSIGN COMPONENT 'FIELD1' OF STRUCTURE <wa_final> TO <w_field>.
<w_field> = '12345'.
ASSIGN COMPONENT 'FIELD2' OF STRUCTURE <wa_final> TO <w_field>.
<w_field> = '21453DD'.
FIELD1 AND FIELD2 ARE COMPONENTS OF FIELDCATALOG.
ENDLOOP.
ENDLOOP. -
Need to add 2 new columns to the existing table control of C223 transaction
Hi ABAP Gurus,
I have to do a screen enhancement for transaction C223.
Below is the requirement:
need to add 2 new columns to the existing table control of C223 transaction.
there is no customer exits, screen exit or user exit present for this transaction C223, i have found one enhancement spot for this transaction.
i dont have any idea how to do this in standard transaction C223, the table control in C223 saves the data to MKAL table and the table control uses the structure MKAL_EXPAND in the screen program.
i have created an append structure for the 2 fields to the standard table MKAL.
Can anyone please suggest me how this can be done in standard screen C223, will the enhancement spot can be used to do this....
please sugest...
Thanks & RegardsHi Santosh,
Thanks for the reply. I have looked into this Enhancement Spot CPFX_SCREEN_SET , inside this there is only one method INPUT_DISABLED having below parameters
IM_MKAL Importing Type MKAL Production Version
EX_MSGID Exporting Type SY-MSGID Messages, Message
EX_MSGTY Exporting Type SY-MSGTY Messages, Message
EX_MSGNO Exporting Type SY-MSGNO Messages, Message
EX_MSGV1 Exporting Type SY-MSGV1 Messages, Message
EX_MSGV2 Exporting Type SY-MSGV2 Messages, Message
EX_MSGV3 Exporting Type SY-MSGV3 Messages, Message
EX_MSGV4 Exporting Type SY-MSGV4 Messages, Message
EX_INPUT_DISABLE Exporting Type CHAR1 Display Only if X Was Set
the BADI definition present here is a SAP internal so we cant implement the BADI , but we can created a enhancement spot implementation for this. as per my understanding on this the enhancement spot is only for making the table control fields display / change . i dont think this can be used to add two new coloumns to C223 table control.
I am not sure thats why seeking your help/valuable sugestion on this.
Please provide your sugestion on this , so that i can come to conclusion on this issue.
Thanks & Regards
Siddhartha Mishra -
I was told I need to remove the enterprise server account I have and need to add a new one for work but the IT person did not tell me how to do this. Can anyone help?
Jennymbell, never fear help is here!
Have you tried contacting your IT department for assistance? You can visit http://bit.ly/QECbGh for steps on how to enterprise activation.
Keep me posted if you need further assistance.
John B
Follow us on Twitter @VZWSupport -
when i am going to Install 11gR2 then thsi error shows how to solve it plz give me guidance
This test checks whether the length of the environment variable "PATH" does not exceed the recommended length.
Expected Value: 1023
Actual Value: 0HELLO iSHAN SHAH
JUST EXPLAIN US YOUR PROBLEM IN DEPTH.
TELL US YOUR HARDWARE AND SOFTWARE CONFIGURATION.
ALSO TELL US IN WHICH STEP OF INSTALLATION , THIS ERROR RAISED.
THANKS
HARSH SHAH -
How to add new field into dynamic internal table
Hello Expert.
how to add new field into dynamic internal table.
PARAMETERS: P_TABLE(30). "table name
DATA: I_TAB TYPE REF TO DATA.
FIELD-SYMBOLS: <TAB> TYPE standard TABLE.
*Create dynamic FS
create DATA I_TAB TYPE TABLE OF (p_table).
ASSIGN I_TAB->* TO <TAB>.
SELECT * FROM (p_table) INTO TABLE <TAB>.
here i want to add one more field into <TAB> at LAST position and my
Field name = field_stype and
Field type = 'LVC_T_STYL'
could you please helpme out .Hi,
Please find the code below.You can add the field acc to your requirement.
Creating Dynamic internal table
TYPE-POOLS: slis.
FIELD-SYMBOLS: <t_dyntable> TYPE STANDARD TABLE, u201C Dynamic internal table name
<fs_dyntable>, u201C Field symbol to create work area
<fs_fldval> type any. u201C Field symbol to assign values
PARAMETERS: p_cols(5) TYPE c. u201C Input number of columns
DATA: t_newtable TYPE REF TO data,
t_newline TYPE REF TO data,
t_fldcat TYPE slis_t_fldcat_alv,
t_fldcat TYPE lvc_t_fcat,
wa_it_fldcat TYPE lvc_s_fcat,
wa_colno(2) TYPE n,
wa_flname(5) TYPE c.
Create fields .
DO p_cols TIMES.
CLEAR wa_it_fldcat.
move sy-index to wa_colno.
concatenate 'COL'
wa_colno
into wa_flname.
wa_it_fldcat-fieldname = wa_flname.
wa_it_fldcat-datatype = 'CHAR'.
wa_it_fldcat-intlen = 10.
APPEND wa_it_fldcat TO t_fldcat.
ENDDO.
Create dynamic internal table and assign to FS
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = t_fldcat
IMPORTING
ep_table = t_newtable.
ASSIGN t_newtable->* TO <t_dyntable>.
Create dynamic work area and assign to FS
CREATE DATA t_newline LIKE LINE OF <t_dyntable>.
ASSIGN t_newline->* TO <fs_dyntable>.
Populating Dynamic internal table
DATA: fieldname(20) TYPE c.
DATA: fieldvalue(10) TYPE c.
DATA: index(3) TYPE c.
DO p_cols TIMES.
index = sy-index.
MOVE sy-index TO wa_colno.
CONCATENATE 'COL'
wa_colno
INTO wa_flname.
Set up fieldvalue
CONCATENATE 'VALUE' index INTO
fieldvalue.
CONDENSE fieldvalue NO-GAPS.
ASSIGN COMPONENT wa_flname
OF STRUCTURE <fs_dyntable> TO <fs_fldval>.
<fs_fldval> = fieldvalue.
ENDDO.
Append to the dynamic internal table
APPEND <fs_dyntable> TO <t_dyntable>.
Displaying dynamic internal table using Grid.
DATA: wa_cat LIKE LINE OF fs_fldcat.
DO p_cols TIMES.
CLEAR wa_cat.
MOVE sy-index TO wa_colno.
CONCATENATE 'COL'
wa_colno
INTO wa_flname.
wa_cat-fieldname = wa_flname.
wa_cat-seltext_s = wa_flname.
wa_cat-outputlen = '10'.
APPEND wa_cat TO fs_fldcat.
ENDDO.
Call ABAP List Viewer (ALV)
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
it_fieldcat = fs_fldcat
TABLES
t_outtab = <t_dyntable>. -
How to check whether a file exist in the program folder or not?
Hi guys,
how to check whether a file exist in the program folder or not? Let is say i recieve a file name from user then i want to know if the file is there not and act on that base.
abdulLook at the class java.io.File and the .exists() method:
http://java.sun.com/j2se/1.4/docs/api/java/io/File.html -
How to check whether set up tables are filled or not
Hi Gurus,
How to check whehter set up tables are filled or not?
Cheers,
Reddy.Hi Reddy.......
And another point I want to make u clear............LBWQ is not the Delta Queue.............Delta queue is RSA7...............it comes into play in delta loading.......LBWQ is Extraction Queue.........While delta loading....if we use the Update mode Queued Delta........then any Changes will not directly get updated in the Delta queue.....For the Delta set up.........
1) First u hav to run init with data transfer(After filling the set up table)
2) After that any Changed ........will be recorded in the Extraction Queue(LBWQ)........
3) After a certain number of records get accumulated in LBWQ........We hav to run V3 jobs to bring the data in the Delta queue(RSA7)...
Check this.....
Re: question on LBWQ and RSA7
Regards,
Debjani.....
Maybe you are looking for
-
I have an Iphone 4s with the latest version of IOS and the problem is that whenever I connect it to Itunes, it says "Iphone cannot be used because it requires Itunes 10.6.3 or later". So i tried to update my Itunes, but no matter what I do, it refuse
-
I'm using an editable combobox with about 8000 items. Then it's quite difficult to select the disired item in the list. I'd like the combo box to follow me while typing: i.e. if i type "M", I want the combobox to display the first item starting wiyh
-
Trouble in storing and retrieving RMI object in Weblogic 7 JNDI tree.
I have created a simple server (BankImpl), implementing a RMI interface called Bank. A stub class (BankImpl_Stub.class) is generated from BankImpl class using "rmic -v1.2". Then I bind an instance of the BankImpl class to the JNDI tree in Weblogic se
-
Really, the only app I want is a good ToDo list that synchronizes with iCal. What are the possibilities?
-
Reducing physical RAM consumption by oracle instance in my laptop
I wanted to reduce the amount of RAM consumed by my Oracle Instance in my machine. OS: Windows Server 2003 DB version: 10GR2.So i tried to reduce the sga_max_size to 200mb then restarted the instance. But sga_max_size remains the same. What am i doin