Internal Table stack not filled
Hi All,
I am getting an error "Internal Table stack not filled" while uploading the sales order through inbound function module IDOC_INPUT_ORDERS.
Could you please help.
Thanks
Saurabh
Edited by: Saurabh Joshi on Mar 5, 2009 7:14 AM
Hi,
I think the order u r trying to create is having some more field which is enhanced from standard. It might be mandatory/ the field is populated values with exits but while moving to standard structure the idoc structure is not enhanced accordingly.
Regards,
Nandha
Similar Messages
-
All values in internal table are not displaing in the script print program
Hi,
I am calling the script program.In main window all values in the internal table are not displaying. I wrote
write-form statement in loop. But not all the values are getting displayed. Only thel ast values getting dispalyed.
*& Report ZSCRIPT_116719
REPORT ZSCRIPT_116719.
************Table decleration***************
TABLES: mara, mbew, makt.
loop at i_makt into wa_makt.
endloop.
loop at i_MARA into wa_mara.
endloop.
LOOP AT I_MBEW INTO WA_MBEW.
ENDLOOP.
lv_price = 0.
********************Total Price******************
LOOP AT i_mbew INTO wa_mbew.
lv_price = lv_price + wa_mbew-stprs.
ENDLOOP.
end-of-selection.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
APPLICATION = 'TX'
ARCHIVE_INDEX =
ARCHIVE_PARAMS =
DEVICE = 'PRINTER'
DIALOG = 'X'
FORM = 'ZSCRIPT_719'
LANGUAGE = SY-LANGU
OPTIONS =
MAIL_SENDER =
MAIL_RECIPIENT =
MAIL_APPL_OBJECT =
RAW_DATA_INTERFACE = '*'
SPONUMIV =
IMPORTING
LANGUAGE =
NEW_ARCHIVE_PARAMS =
RESULT =
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
MAIL_OPTIONS = 6
ARCHIVE_ERROR = 7
INVALID_FAX_NUMBER = 8
MORE_PARAMS_NEEDED_IN_BATCH = 9
SPOOL_ERROR = 10
CODEPAGE = 11
OTHERS = 12
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'START_FORM'
EXPORTING
ARCHIVE_INDEX =
FORM = 'ZSCRIPT_719'
LANGUAGE = SY-LANGU
STARTPAGE = ' '
PROGRAM = 'ZSCRIPT_116719'
MAIL_APPL_OBJECT =
IMPORTING
LANGUAGE =
EXCEPTIONS
FORM = 1
FORMAT = 2
UNENDED = 3
UNOPENED = 4
UNUSED = 5
SPOOL_ERROR = 6
CODEPAGE = 7
OTHERS = 8
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*LOOP AT I_MBEW INTO WA_MBEW.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'DATA'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
IMPORTING
PENDING_LINES =
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
CODEPAGE = 9
OTHERS = 10
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*ENDLOOP.
If I give only one value it is showing the output. When I am fetching the data for range of values it i sshowing start_form is not there.
Plz let me know how to get the aa internal table values to be displayedhi
I shortened your program a bit. So we can go to essentials of your question.
You said you put in it in a loop.
What i see in your prog is:
REPORT zscript_116719.
************table decleration***************
TABLES: mara, mbew, makt.
LOOP AT i_makt INTO wa_makt.
ENDLOOP.
LOOP AT i_mara INTO wa_mara.
ENDLOOP.
LOOP AT i_mbew INTO wa_mbew.
ENDLOOP.
lv_price = 0.
********************total price******************
LOOP AT i_mbew INTO wa_mbew.
lv_price = lv_price + wa_mbew-stprs.
ENDLOOP.
END-OF-SELECTION.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
form = 'ZSCRIPT_719'
language = sy-langu.
CALL FUNCTION 'START_FORM'
EXPORTING
form = 'ZSCRIPT_719'
language = sy-langu
program = 'ZSCRIPT_116719'.
*LOOP AT I_MBEW INTO WA_MBEW.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'DATA'
function = 'SET'
type = 'BODY'
window = 'MAIN'.
*endloop.
1. Your loop is not a loop with this '*' in front of it.
2. Are you printing &wa_mbew-???& variables in your sap-script
3. is itab I_MBEW properly filled
Let me know.
Gr. Frank -
Internal table content not retained in statefull BSP application.
Hi Forum,
I have a statefull BSP application with two pages.I fill an internal table ITAB in the OnInputProcessing eventhandler of first page and then transfer this ITAB to second page , but when i navigate back from second page to first page , the internal table ITAB is cleared.I need the data in ITAB when i come back to first page.
The internal tables that i fill in the OnCreate eventhandler of the first page are intact but this ITAB that i fill in OnInputProcessing is cleared.
I tried using
runtime->keep_context = 1.
but it is not helping either...and i have checked the code carefully to ensure that ITAB is not cleared anywhere using CLEAR ITAB.
ITAB is declared in PAGE ATTRIBUTES using a tabletype.
What might be the problem?
Thanks,
Anubhav.Hi Heth,
I carried out a small test application as follwos:
1)Filled an internal table ITAB_ZSCMG in OnCreate event of first page.
2)Filled an internal table ITAB_MATERIALS in OnInputProcessing for the OnClick of button event.
When my application was stateless the internal table ITAB_ZSCMG was initial in the OnInputProcessing event .
When i switched to STATEFULL mode , it contained data in the OnInputProcessing .
3)Crearted one more page SECOND.HTM.
4)in the OnClick event for button in OnInputProcessing eventhandler i navigated back to FIRST.HTM .
Found that all the internal tables were initial , although my page was statefull.
All these ITABs were declared using Page Attributes.
So i guess , a statefull application just means that DATA is retained between different eventhandlers of the SAME PAGE and not if we navigate from that page....
Hence in my case i have to transfer the ITAB back to first page again using SERVER SIDE COOKIES..
Please correct me if my derivations are wrong!!!
But the question still remains....
How to retain data after navigation?
Do we have a solution in BSP or we need to use SET/GET or EXPORT/IMPORT or COOKIES?
Thanks,
Anubhav.
Edited by: Anubhav Jain on Jun 19, 2008 9:04 AM -
Internal table is not modifying
Hi
my internal table is not modifying..
the code is like this:
SELECT matnr ebeln lifnr
FROM eord
INTO CORRESPONDING FIELDS OF
TABLE it_eord_lfa1_tab
WHERE lifnr IN s_lifnr
AND matnr IN s_matnr.
AND werks IN s_werks
IF sy-subrc EQ 0.
LOOP AT it_eord_lfa1_tab INTO wa_eord_lfa1_tab .
CLEAR l_name1.
SELECT SINGLE name1
FROM lfa1 INTO l_name1
WHERE lifnr = wa_eord_lfa1_tab-lifnr.
wa_zresult_tab1-ebeln = wa_eord_lfa1_tab-ebeln.
wa_zresult_tab1-lifnr = wa_eord_lfa1_tab-lifnr.
wa_zresult_tab1-name1 = l_name1.
MODIFY it_zresult_tab1 FROM wa_zresult_tab1
transporting ebeln lifnr name1.
it_zresult_tab1 contians already some records I would like to modify the record with tranporting values...
Please help me..LOOP AT it_eord_lfa1_tab INTO wa_eord_lfa1_tab .
CLEAR l_name1.
SELECT SINGLE name1
FROM lfa1 INTO l_name1
WHERE lifnr = wa_eord_lfa1_tab-lifnr.
if sy-subrc = 0.
<b>these 2 below values seems to be already in the internal table, again why you are transporting ?
wa_zresult_tab1-ebeln = wa_eord_lfa1_tab-ebeln.
wa_zresult_tab1-lifnr = wa_eord_lfa1_tab-lifnr.</b>
wa_zresult_tab1-name1 = l_name1.
<b>wa_eord_lfa1_tab-name1 = L_NAME1</b>
MODIFY it_zresult_tab1 FROM wa_eord_lfa1_tab
INDEX SY-TABIX
transporting ebeln lifnr name1 .
ENDLOOP.
here i am not getting why you are using another workarea to modify the internal table as you already have an work area <b>wa_eord_lfa1_tab</b>. and i think its no need to modify EBELN and LIFNR as they are already been in the table.
so the best way is if SY-SUBRC = 0 for that SELECT FROM LFA1 just pass L_NAME1 to wa_eord_lfa1_tab-name1 and MODIFY the internal table only with NAME1. others not required.
Regards
Srikanth
Message was edited by: Srikanth Kidambi -
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' -
hi experts,
i have a problem while using ME38 transaction.
ME38 calls exit EXIT_SAPMM06E_012
inside this exit we are calling macro mmpur_business_obj_id tekpo-id. in turn it goes to method search of class CL_HANDLE_MANAGER_MM where internal table my_items is not getting filled. due to that we are getting dump "Exception FAILURE".
Thanks in advance
Chandrahi
put break point before the step and find out the value of your table or check the paramter value you are passing -
Value of new field in SAP internal table does not appear in HTML
There is already an existing web application. (has both SAP and HTML programs)
I only need to add one field in the SAP internal table and display the value in HTML.
I activated and pushed the publish button in SAP.
Still, it is not read successfully in HTML and therefore not displayed in the GUI.
What step did I miss?Hi,
To publish completely an internet service, try SIAC_PUBLISH_ALL_INTERNAL transaction.
Hope this helps,
Iván. -
Update databse from internal table statement not using index
Hi Guys,
We are updating a databse table from a file. The file has a couple of fields which have data different from what the database has (non-primary fields :). We upload the file data into an internal table and then update the database table from internal table. At a time, internal table is supposed to have 10,000 records. I did SQL trace and found that the update statement is not making use of the databse index.
Should not the update statement here be using the table index (for primary key)?
Regards,
Munish... as often there are recommendations in this forum which makes me wonder, how people overestimate their knowledge!!!
Updates and Deletes do of course use indexes, as can be seen in the SQL Trace (use explain).
Inserts don't use indexes, because in many databases inserts are just done somewhere, But also with the INSERT, the primary key is the constraint for the uniqueness condition, duplicate keys are not allowed.
Coming to the original question, what is you actually coding for the update?
What is the table, which fields are in the internal table and what are the indexes?
Siegfried -
Delete and internal table with not eqaul to fields
Hi I have an internal table I want delete few records with fields not equal to the variable v_lifnr, v_name1 and v_city,
structure of internal table has fields LIFNR, NAME1, CITY, TEXT1 and TEXT2.
I dont want to go by deletin in loop.Hi ,
i want to delete a internal table record based on the values which are NOT in the ranges ..
I am facing a syntax error with not operation in some system s
code looks like below !
i am not facing this problem when there in no not in ranges.
Thanks .
RANGES: RA_FFIDS FOR /VIRSA/ZFFUSERS-ZVIRFFID.
data : BEGIN OF IZVIRFFTRANSLOG OCCURS 0.
INCLUDE STRUCTURE /VIRSA/ZFFTNSLOG.
DATA: DESC LIKE RS38M-REPTI,
END OF IZVIRFFTRANSLOG.
data : IT_ZFlight_T LIKE IZVIRFFTRANSLOG OCCURS 0 WITH HEADER LINE.
IF NOT IT_ZFlight_T_TCODE[] IS INITIAL.
DELETE IT_ZFlight_T_TCODE WHERE ZVIRFFID NOT IN RA_FFIDS.
DELETE IT_ZFlight_T WHERE ZVIRFFID NOT IN RA_FFIDS.
ENDIF. -
Table is not filling with the RFC data
Hi,
I am new to WDJ. I have a created a wdj application by importing adaptive RFC model. deployment is sucessful but at runtime the table is not getting filled up with the RFC data. RFC is executing find from the backend. JCO is maintained correctly in the webdynpro, mapping and binding is done.
Could someone guide where could be the problem?
I am giving the code below for doinit and service controller method.
public void wdDoInit()
//@@begin wdDoInit()
//$$begin Service Controller(-222509821)
wdContext.nodeZsalesheader_Data_Input().bind(new Zsalesheader_Data_Input());
// wdComponentAPI.getMessageManager().reportSuccess("Node value " + wdContext.currentContextElement().getAttributeAsText("auart"));
//$$end
//@@end
public void executeZsalesheader_Data_Input( )
//@@begin executeZsalesheader_Data_Input()
//$$begin Service Controller(-1232218854)
IWDMessageManager manager = wdComponentAPI.getMessageManager();
try
wdContext.nodeOutput().invalidate();
wdContext.currentZsalesheader_Data_InputElement().modelObject().execute();
catch(WDDynamicRFCExecuteException e)
manager.reportException(e.getMessage(), false);
//$$end
//@@end
Can anybody guide if am missing something?
Regards
Sireesha.Anup and all,
Can anyone please identify whats the mistake in the below code?
OnLeadSelect Event
wdContext.nodeZsalesheader_Data_Input().getElementAt(wdContext.getLeadSelection()).getAttributeValue("Vbeln"));
I am getting a runtime exception that "unknown attribute Vbeln".
Here is my Context Node.
---Zsalesheader_Data_Input
Output
T_Salesheader
Vbeln
Auart
Vbtyp
Trvog
As per the above Context structure is my code correct? If not how do i read the value vbeln from the above context?
Can anyone pls advice?
Regards
Sireesha. -
Query Tables Does Not Fill Down Formulas When Refreshed
I have used external data queries for several years, connecting to a variety of data sources, but most frequently to SQL server 2005 using MS Query and ODBC. Anyway, in Excel 2007, when I refresh my queries and the data range adds new
rows to the query table, the formluas do not fill down past the previous extent of the data range. These are not external queries converted from a previous version of Excel; I built them in Excel 2007, and the issue persists across multiple workbooks.
To answer the inevitble suggestions:
1) The formulas are definitely in the query tables, not adjacent.
2) "Extend data range formats and formulas" is enabled in the advanced tab of Excel options.
I've found threads on other sites where users had similar problems, but have not seen a satisfactory solution or even a good response to their inquiries. Any ideas?
P. Dolan
Stat Analyst, TN Dept of SafetyI have the same issue with excel 2010. To answer Ryan's last question, Excel does seem to consider all the added rows as begin part of the table. On the pre 2007 queries, there was an option under 'External data properties'
to specify whether you wanted the formulas to copy down to the new rows. When this option was selected, it worked without fail. Under 2007 and 2010 this option no longer appears, but most of the time the formulas do copy down properly, but eventually
something happens to cause this to stop occuring. The only fix I have found is to recreatet the whole query again. It then works for awhile and then stops working at some point. I wish I could isolate what causes it to stop, but I haven't been
able to figure it out.
Same with me and Excel 2010. The help refers to the option, but my dialog box does not have it. (Another option that has disappeared is the ability to get column headers derived from the returned query.)
Excerpt from help:
On the Data tab, in the Connections group, click
Properties.
In the External Data Range Properties dialog box, select the
Fill down formulas in columns adjacent to data check box. -
CO extractors: Table COOI_PI not filled
Dear friends,
I'm working with the datasource 0CO_OM_WBS_7 (WBS Elements: Commitment
Line Items). I'm using delta extraction. I read this link:
http://help.sap.com/saphelp_nw70/helpdata/en/8d/1f383fe58d5900e10000000a114084/frameset.htm
"Deleted records are a special case. If records are deleted in R/3, they are not extracted. For this reason, the records are not deleted in the BW. To solve this problem, after the first delta init is executed all deleted commitments line items are written to a special R/3 table (COOI_PI), and this table is extracted as well."
I executed the delta init but after that if i make changes to a purchase requisition (e.g. i change the account assignment: i move from a wbs element to a network) the deletion record is not generated in table COOI_PI. If i test the extraction with RSA3 i don't get the deleted record because it's no more in table COOI with reference to a wbs element (it is referenced to a network). As a result, deleted record is not in table COOI nor in table COOI_PI. The purchase requisition in the ODS gets obsolete.
This is happening also if i leave the purchase requisition without an account assignent.
The difference is that in the first scenario the purchase requisiton exists in table COOI but under a network and in the second scenario there is no record at all in table COOI.
Both scenarios are not registered in the COOI_PI.
When i made the delta init an index 971 is created automatilly in tables COOI_PI and COOI. Also 3 entries are created in table BWOM_SETTINGS:
OLTPSOURCE PARAM_NAME PARAM_VALUE
COOI INDXNAME 917
COOI_PI DAYS_REORG 380
COOI_PI LAST_REORG 20080714
I read the notes 974415, 1174833 but the attached corrections were already implemented.
Do u have an idea about when table COOI_PI is filled?. Are there any conditions to execute the delta init so table COOI_PI starts to work?.
I'd appreciate your help.
Jose Marianeed to add a new record into BWOM_SETTINGS or update the PARAM_VALUE
OLTPSOURCE PARAM_NAME PARAM_VALUE
OBLIGODELT PI_RELEASE_AT_LEAST_PI2002_1
Because ECC6 ME23N will excute the Function " K_OPEN_ITEM_POST " and the function will call the follow form.
FORM vb_cooi_pi_insert TABLES t_cooi_del structure COOI
using value(id_timestmp).
CONSTANTS:
lc_param_name TYPE field VALUE 'OBLIGODELT',
lc_param_value TYPE char40
VALUE 'PI_RELEASE_AT_LEAST_PI2002_1',
lc_cooi_pi TYPE tabname VALUE 'COOI_PI'.
DATA:
ld_param_value TYPE char40.
-----CHECK: BW extraction of obligo line items active?--
CALL FUNCTION 'REUT_GET_BWOM_SETTINGS'
EXPORTING
id_param_name = lc_param_name
IMPORTING
ed_value = ld_param_value
EXCEPTIONS
bw_pi_not_exist = 1
OTHERS = 2.
IF sy-subrc <> 0 OR
ld_param_value NE lc_param_value.
No: EXIT.
EXIT.
ENDIF.
Set time stamp
LOOP AT t_cooi_del.
MOVE id_timestmp TO t_cooi_del-timestmp.
MODIFY t_cooi_del.
ENDLOOP.
--Write: DELETE protocol for BW extraction--
delete (note 974415):
INSERT (lc_cooi_pi) FROM TABLE t_cooi_del ACCEPTING DUPLICATE KEYS.
MODIFY (lc_cooi_pi) FROM TABLE t_cooi_del. "974415
--Abbruch Delete--
IF sy-subrc NE 0.
RAISE e_delete_cooi.
ENDIF.
ENDFORM.
suolin.rong&g-m-a-i-l.com
MSN: simon123_rong&h-o-t-m-a-i-l.com
Edited by: yarchen wen on Aug 13, 2009 11:16 AM -
Creation of dynamic internal table is not synchronous
In my code following lines are used to create a dynamic table.
REFRESH : INCTABL .
CLEAR INCTABL .
INCTABL-LINE = 'data: begin of dyntab occurs 10,'. APPEND INCTABL.
INCTABL-LINE = 'zpltnamec like zvendplt-zpltnamec,'. APPEND INCTABL.
INCTABL-LINE = 'sourcing like zopsdwbom-sourcing,'. APPEND INCTABL.
INCTABL-LINE = 'zmatgrp like zrmrpmaterial-zmatgrp,'. APPEND INCTABL.
INCTABL-LINE = 'zcollection like zrmrpmaterial-zcollection,'.
APPEND INCTABL.
INCTABL-LINE = 'fiscintrodt like zrmrpmaterial-zfiscintrodt,'.
APPEND INCTABL.
INCTABL-LINE = 'bednr like ekpo-bednr,'. APPEND INCTABL.
INCTABL-LINE = 'revlv like ekpo-revlv,'. APPEND INCTABL.
INCTABL-LINE = 'ematn like ekpo-ematn,'. APPEND INCTABL.
INCTABL-LINE = 'menge like mara-eannr,'. APPEND INCTABL.
INCTABL-LINE = 'stprs like mara-eannr,'. APPEND INCTABL.
*inctabl-line = 'kbetr like cdred-f_new,'. append inctabl.
DATA : T_KBETR(72) .
DATA :CNT(2).
DO LIN TIMES .
CNT = SY-INDEX .
CONCATENATE 'kbetr' CNT ' like cdred-f_new,' INTO T_KBETR .
CONDENSE T_KBETR .
INCTABL-LINE = T_KBETR . APPEND INCTABL.
ENDDO .
INCTABL-LINE = 'end of dyntab. '. APPEND INCTABL.
INSERT REPORT 'zcrchangereport_3'(001) FROM INCTABL.
but during run time it is using the previously created dynamic internal table structure and then creating currently required internal table.
how to overcome this problem/
Thanks.Hello,
Instead of creating report, create subroutine pool. Like
INCTABL-LINE = 'report ztest.'. APPEND INCTABL.
INCTABL-LINE = 'form main'. APPEND INCTABL.
INCTABL-LINE = 'data: begin of dyntab occurs 10,'. APPEND INCTABL.
INCTABL-LINE = 'zpltnamec like zvendplt-zpltnamec.'. APPEND INCTABL.
INCTABL-LINE = 'data: end of dyntab.'. APPEND INCTABL.
CATCH SYSTEM-EXCEPTIONS GENERATE_SUBPOOL_DIR_FULL = 9.
GENERATE SUBROUTINE POOL inctabl NAME l_name
MESSAGE L_MESSAGE LINE L_LINE WORD L_WORD.
ENDCATCH.
IF L_MESSAGE IS INITIAL.
PERFORM (L_FORM) IN PROGRAM (L_NAME).
ELSE.
WRITE : L_MESSAGE, L_LINE.
ENDIF.
You can get the message in L_message variable, if any error occurs.
Regards,
Naimesh -
Data populated in internal Table its not diplay in result
Hi ABAPers,
i have one doubt in internal table one field data is populated but in result its diplayed. can any one tell me the solution for this
regards,
kishore.hi this is a simple report on internal table.
REPORT zvenkattest0.
TABLES:pa0002,pa0008.
data:begin of it_pa0002 occurs 0,
pernr like pa0002-pernr,
begda like pa0002-begda,
endda like pa0002-endda,
vorna like pa0002-vorna,
nachn like pa0002-nachn,
end of it_pa0002.
SELECT-OPTIONS: S_pernr FOR pa0002-pernr.
START-OF-SELECTION.
SELECT pernr
begda
endda
vorna
nachn
FROM pa0002
INTO TABLE IT_pa0002
WHERE pernr IN S_pernr.
sort it_pa0002 by pernr begda descending.
loop at it_pa0002.
write:/ it_pa0002-pernr,
it_pa0002-begda,
it_pa0002-endda,
it_pa0002-vorna,
it_pa0002-nachn.
endloop.
reward points if useful,
venkat. -
hi,
i am posting the select part of my code and would like to ask someone to look trough it and to check why my internal table isn't filling up???
thanx so much in advance!!!
code:
SELECT vbeln fkart fktyp vbtyp waerk vkorg vtweg knumv
fkdat gjahr poper zterm netwr kunrg mwsbk
zuonr kunag
INTO CORRESPONDING FIELDS OF TABLE it_hd
FROM vbrk
WHERE vbeln IN so_vbeln AND
erdat IN so_erdat.
IF vbrk-vbtyp = 'H' OR
vbrk-vbtyp = 'K' OR
vbrk-vbtyp = 'N' OR
vbrk-vbtyp = 'O' OR
vbrk-vbtyp = 'T' OR
vbrk-vbtyp = '6'.
wa_hd-bsart = 'CRME'.
ELSE.
wa_hd-bsart = 'INVO'.
IF sy-subrc <> 0.
WRITE: / 'Wrong IF statement'.
ENDIF.
ENDIF.
Majahere it is:
DATA: BEGIN OF wa_hd,
vbeln TYPE vbrk-vbeln,
gjahr TYPE vbrk-gjahr,
poper TYPE vbrk-poper,
fkart TYPE vbrk-fkart,
fktyp TYPE vbrk-fktyp,
vbtyp TYPE vbrk-vbtyp,
kunrg TYPE vbrk-kunrg,
fkdat TYPE vbrk-fkdat,
zterm TYPE vbrk-zterm,
invdue_date TYPE sy-datum,
vkorg TYPE vbrk-vkorg,
vtweg TYPE vbrk-vtweg,
waerk TYPE vbrk-waerk,
netwr TYPE vbrk-netwr,
mwsbk TYPE vbrk-mwsbk,
knumv TYPE vbrk-knumv,
zuonr TYPE ordnr_v,
kunag TYPE kunag,
bsart TYPE bsart ,
END OF wa_hd,
it_hd LIKE TABLE OF wa_hd.
Maybe you are looking for
-
T61 external monitor permenantl​y in sleeping mode
Greetings, I want to run an external monitor with my T61 for desktop extention. It was working fine, until I once booted up my PC before having switched on the external monitor. Since that day I have never been able to display anything on the monit
-
Hey guys im having this issue with my recently bought iPod Touch 4G...all of a sudden some artworks started mixing up and some appear just a half and a half of another one...what can it be?? any suggestion other than restoring the device( cause it wo
-
Error Message concern......
Hello, I received an error, "The listener returned the following message 404 Not Found." Would someone assist me with what this error means and what would cause it to occur?
-
Hi, I am trying to delete some members in a dimension, however when I process the dimension, I get an error message, saying the member is being used. I had run the CLEAR DM package for the member in question, so I was a bit surprised but then found t
-
Subcontracting process - partially subcontracted and partially in-house
Hello, I have a scenario where one of my BoM items is produced in-house as well as sub-contracted. If my lines are loaded, then I perform material subcontracting. How do I map this in SAP? Thanks. Regards