Tcode definition
Hi Friends,
Please explain me, how to use this Tcode for sale order creation:- ZMPC_ZPR_VA01?? what is the usage?? Is this for Mass SO creation?? If yes, can anyone have screen shot for this???
Help me on this!
Kind Regards,
Jayapriya . J
Hi
Take in account SAP Note 16466 - Customer name range for SAP objects. It tells us the range for customer developments in all type of objects.
Regards
Eduardo
Similar Messages
-
Assign authorization group to transaction
Hi,
I have to assign a auth group to Z-transaction. How can i do this.
Thanks,Hi,
What type of paramater transaction you have created? Have you created a paramater transaction for a view or a table?
I think when you create a parameter transaction the authorization is controled from the parent transaction and not in the tcode definition.
You can use S_TCODE to assign the paraeter transaction to any user and control it based on the user profile.
Cheers
VJ -
How to find next number range for project definition in tcode CJ20N
Hai Experts,
Please help me 'How to find next number range for project definition in tcode "CJ20N". I was trying in function module NUMBER_GET_NEXT. Is it right function module? If its right what input i need to give for this tcode and for the field project definition?
Note: I searched in forum before posting, but couldn't find the solution.
Thanks
Regards,
Prabu S.Hi,
For project defination internal number is assigned by system.
When you saves's project then system allocate one number to project defination, you can view it,
SE11 >>> table PROJ >> Click on contents >>> execute,
here you will get your project defination & number is assigned to project defination.
kapil -
Schedule Manager (add Tcode to Flow Definition step)
Hello together,
I have got a problem with the schedule manager ("scma").
I would like to add the Tcode cja1 (Project-Related Incoming Orders) alternatively the program "SAPLKAZB" to a flow definition step with a variant.But the program "SAPLKAZB" is used for more tcodes than "cja1".
How can I solve this problem?
Thanks in advance!
Greetings,
PeterHello,
The Program 'SAPLKAZB' cannot be added to the flow definition step since its function pool and not an executable program due to which you wont be able to execute it.
So its better the transaction 'CJA1' can be added to flow definition step and no alternative for program with varaint coz it wont work.
Regards,
Mansi. -
Issue in CJ20N tcode for project definition field
Hi guys,
After the project definition is created in the system, I have executed the transaction code and when I clicked on change icon(toggle button which is available in the application toolbar) the project definition field is in edit mode. This should not happen at all.
Kindly let me know your findings on this.
Thanks & Regards,
RgHi,
For project defination internal number is assigned by system.
When you saves's project then system allocate one number to project defination, you can view it,
SE11 >>> table PROJ >> Click on contents >>> execute,
here you will get your project defination & number is assigned to project defination.
kapil -
Run time error while saving values in File (Tcode)
Hi,
I am using FM call function 'FILE_GET_NAME'
exporting
logical_filename = logical_filename
parameter_1 = program_name
parameter_2 = file_id_param
importing
file_name = physical_filename
exceptions
file_not_found = 1
others = 2.
for this I am trying to maintain dynamic values(field symbols) in Tcode FILE Logical file name definition , physical path as.
Physical file =<PARAM_1>.<PARAM_2>
But while saving it dumps, saying filed symbol assinment to substring is not allowed.
Physical path for the same is /<V=Z_DIR_MAIN>/<SYSID>/<V=Z_DIR_OUT>/<FILENAME>.<CLIENT>.<DATE><TIME>.
Regards
Mohinder Singh ChauhanHello Mohinder,
the better way to analyse these kind of things is by entering the function module in se37 and providing the required test data.
In your scenarion as you say its throwing a runtime dump related to field symbols better you concatenate the data param1 and param2 into a new variable and then pass that value into the function module.
Thanks,
M.Naveen kumar -
Navigation from ALV Record to Tcode
Hello All,
I have a requirement like this,
My zPROGARM is displaying one ALV output. When an user select one record/cell
it has to navigate to particular Tcode .
Is it Possible?
Kindly advice me on this.
Thankyou,
Ram.HI...,,
Check this program...
REPORT YH627_PO_CHANGES_SOX_REPORTING MESSAGE-ID M8.
*"Table declarations...................................................
TABLES:
EKKO, " Purchasing Document Header
CDHDR, " Change document header
SSCRFIELDS. " Fields on selection screens
*"Selection screen elements............................................
SELECT-OPTIONS:
S_EBELN FOR EKKO-EBELN, " Purchasing Document Number
S_LIFNR FOR EKKO-LIFNR, " Vendor's account number
S_EKGRP FOR EKKO-EKGRP, " Purchasing group
S_BEDAT FOR EKKO-BEDAT, " Purchasing Document Date
S_UDATE FOR CDHDR-UDATE. " Creation date of the change
" document
*" Data declarations...................................................
Field String to hold Purchase Document Number *
DATA:
BEGIN OF FS_EBELN,
EBELN(90) TYPE C, " Purchase Document Number
ERNAM TYPE EKKO-ERNAM, " Name of Person who Created
" the Object
LIFNR TYPE EKKO-LIFNR, " Vendor's account number
EKGRP TYPE EKKO-EKGRP, " Purchasing group
BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
END OF FS_EBELN,
Internal table to hold Purchase Document Number *
T_EBELN LIKE STANDARD TABLE
OF FS_EBELN.
Field String to hold Purchase Document Header *
DATA:
BEGIN OF FS_EKKO,
EBELN TYPE EKKO-EBELN, " Purchasing Document Number
ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
" Object
LIFNR TYPE EKKO-LIFNR, " Vendor's account number
EKGRP TYPE EKKO-EKGRP, " Purchasing group
BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
END OF FS_EKKO,
Internal table to hold Purchase Document Header *
T_EKKO LIKE STANDARD TABLE
OF FS_EKKO.
Field String to hold Account Number and name of the Vendor *
DATA:
BEGIN OF FS_LFA1,
LIFNR TYPE LFA1-LIFNR, " Account Number of Vendor
NAME1 TYPE LFA1-NAME1, " Name1
END OF FS_LFA1,
Internal table to hold Account number and Name of the Vendor *
T_LFA1 LIKE STANDARD TABLE
OF FS_LFA1.
Field String to hold Change date and the name of the user *
DATA:
BEGIN OF FS_CDHDR,
OBJECTCLAS TYPE CDHDR-OBJECTCLAS, " Object Class
OBJECTID TYPE CDHDR-OBJECTID, " Object value
CHANGENR TYPE CDHDR-CHANGENR, " Document change number
USERNAME TYPE CDHDR-USERNAME, " User name
UDATE TYPE CDHDR-UDATE, " Creation date of the change
" document
END OF FS_CDHDR,
Internal Table to hold Change date and the name of the user *
T_CDHDR LIKE STANDARD TABLE
OF FS_CDHDR.
Field String to hold Change document items *
DATA:
BEGIN OF FS_CDPOS,
OBJECTCLAS TYPE CDPOS-OBJECTCLAS," Object class
OBJECTID(10) TYPE C, " Object Value
CHANGENR TYPE CDPOS-CHANGENR, " Document change number
TABNAME TYPE CDPOS-TABNAME, " Table Name
FNAME TYPE CDPOS-FNAME, " Field Name
VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
END OF FS_CDPOS,
Internal Table to hold Change document items *
T_CDPOS LIKE STANDARD TABLE
OF FS_CDPOS.
Field String to hold Date Element Name *
DATA:
BEGIN OF FS_DATAELE,
TABNAME TYPE DD03L-TABNAME, " Table Name
FIELDNAME TYPE DD03L-FIELDNAME, " Field Name
ROLLNAME TYPE DD03L-ROLLNAME, " Data element
END OF FS_DATAELE,
Internal Table to hold Data Element Name *
T_DATAELE LIKE STANDARD TABLE
OF FS_DATAELE.
Field String to hold Short Text of the Date Element *
DATA:
BEGIN OF FS_TEXT,
ROLLNAME TYPE DD04T-ROLLNAME, " Data element
DDTEXT TYPE DD04T-DDTEXT, " Short Text
END OF FS_TEXT,
Internal Table to hold Short Text of the Date Element *
T_TEXT LIKE STANDARD TABLE
OF FS_TEXT.
Field String to hold data to be displayed on the ALV grid *
DATA:
BEGIN OF FS_OUTTAB,
EBELN TYPE EKKO-EBELN, " Purchasing Document Number
ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
" Object
LIFNR TYPE EKKO-LIFNR, " Vendor's account number
EKGRP TYPE EKKO-EKGRP, " Purchasing group
BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
WERKS TYPE LFA1-WERKS, " Plant
NAME1 TYPE LFA1-NAME1, " Name1
USERNAME TYPE CDHDR-USERNAME, " User name
UDATE TYPE CDHDR-UDATE, " Creation date of the change
" document
DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
" Repository Objects
VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
END OF FS_OUTTAB,
Internal Table to hold data to be displayed on the ALV grid *
T_OUTTAB LIKE STANDARD TABLE
OF FS_OUTTAB.
C L A S S D E F I N I T I O N *
CLASS LCL_EVENT_HANDLER DEFINITION DEFERRED.
*" Data declarations...................................................
Work variables *
DATA:
W_EBELN TYPE EKKO-EBELN, " Purchasing Document Number
W_LIFNR TYPE EKKO-LIFNR, " Vendor's account number
W_EKGRP TYPE EKKO-EKGRP, " Purchasing group
W_VALUE TYPE EKKO-EBELN, " Reflected Value
W_SPACE VALUE ' ', " Space
*--- ALV Grid
W_GRID TYPE REF TO CL_GUI_ALV_GRID,
*--- Event Handler
EVENT_CLICK TYPE REF TO LCL_EVENT_HANDLER,
*--- Field catalog table
T_FIELDCAT TYPE LVC_T_FCAT.
AT SELECTION-SCREEN EVENT *
AT SELECTION-SCREEN ON S_EBELN.
PERFORM VALIDATE_PD_NUM.
AT SELECTION-SCREEN ON S_LIFNR.
PERFORM VALIDATE_VEN_NUM.
AT SELECTION-SCREEN ON S_EKGRP.
PERFORM VALIDATE_PUR_GRP.
START-OF-SELECTION EVENT *
START-OF-SELECTION.
PERFORM SELECT_PO.
PERFORM SELECT_OBJ_ID.
PERFORM SELECT_CHANGED_VALUE.
PERFORM SELECT_PUR_DOC.
PERFORM SELECT_VENDOR.
PERFORM DESCRIPTION.
END-OF-SELECTION EVENT *
END-OF-SELECTION.
IF NOT T_EKKO IS INITIAL.
PERFORM FILL_OUTTAB.
ENDIF. " IF NOT T_EKKO...
PERFORM PREPARE_FIELD_CATALOG CHANGING T_FIELDCAT .
CALL SCREEN 100.
CLASS LCL_EVENT_HANDLER DEFINITION
<b>CLASS LCL_EVENT_HANDLER DEFINITION .
PUBLIC SECTION .
METHODS:
HANDLE_HOTSPOT_CLICK
FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
IMPORTING E_ROW_ID E_COLUMN_ID.
ENDCLASS. " LCL_EVENT_HANDLER</b> DEFINITION
CLASS LCL_EVENT_HANDLER IMPLEMENTATION
CLASS LCL_EVENT_HANDLER IMPLEMENTATION .
*---Handle Double Click
<b> METHOD HANDLE_HOTSPOT_CLICK .
PERFORM GET_CELL_INFO.
SET PARAMETER ID 'BES' FIELD W_VALUE.
CALL TRANSACTION 'ME23N'.
ENDMETHOD. " HANDLE_HOTSPOT_CLICK</b>
ENDCLASS. " LCL_EVENT_HANDLER
*& Module STATUS_0100 OUTPUT
PBO Event
MODULE STATUS_0100 OUTPUT.
IF T_OUTTAB IS INITIAL.
LEAVE PROGRAM.
ENDIF. " IF T_OUTTAB...
SET PF-STATUS 'OOPS'.
SET TITLEBAR 'TIT'.
IF W_GRID IS INITIAL.
CREATE OBJECT W_GRID
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
I_PARENT = CL_GUI_CONTAINER=>SCREEN0
I_APPL_EVENTS =
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
I_FCAT_COMPLETE = SPACE
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 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. " IF SY-SUBRC <> 0
CALL METHOD W_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
IS_VARIANT =
I_SAVE =
I_DEFAULT = 'X'
IS_LAYOUT =
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
IR_SALV_ADAPTER =
CHANGING
IT_OUTTAB = T_OUTTAB
IT_FIELDCATALOG = T_FIELDCAT
IT_SORT =
IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
OTHERS = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. " IF SY-SUBRC <> 0.
ENDIF. " IF W_GRID IS INITIAL
CREATE OBJECT EVENT_CLICK.
SET HANDLER EVENT_CLICK->HANDLE_HOTSPOT_CLICK FOR W_GRID.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
PAI Event
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'CANCEL'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form PREPARE_FIELD_CATALOG
Subroutine to build the Field catalog
<--P_T_FIELDCAT Field Catalog Table
FORM PREPARE_FIELD_CATALOG CHANGING PT_FIELDCAT TYPE LVC_T_FCAT .
DATA LS_FCAT TYPE LVC_S_FCAT.
LS_FCAT-FIELDNAME = 'EKGRP'(011).
LS_FCAT-REF_TABLE = 'EKKO'(002).
LS_FCAT-INTTYPE = 'C'(003).
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
<b> LS_FCAT-FIELDNAME = 'EBELN'(001).
LS_FCAT-REF_TABLE = 'EKKO'(002) .
LS_FCAT-EMPHASIZE = 'C411'(007).
LS_FCAT-INTTYPE = 'C'(003).
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-HOTSPOT = 'X'(004).
APPEND LS_FCAT TO PT_FIELDCAT .
CLEAR LS_FCAT .</b>
LS_FCAT-FIELDNAME = 'ERNAM'(006) .
LS_FCAT-REF_TABLE = 'EKKO'(002) .
LS_FCAT-OUTPUTLEN = '15' .
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
LS_FCAT-FIELDNAME = 'BEDAT'(013).
LS_FCAT-REF_TABLE = 'EKKO'(002).
LS_FCAT-INTTYPE = 'C'(003).
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
LS_FCAT-FIELDNAME = 'LIFNR'(009).
LS_FCAT-REF_TABLE = 'EKKO'(002).
LS_FCAT-INTTYPE = 'C'(003).
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
LS_FCAT-FIELDNAME = 'NAME1'(015).
LS_FCAT-REF_TABLE = 'LFA1'(016).
LS_FCAT-INTTYPE = 'C'(003).
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
LS_FCAT-FIELDNAME = 'UDATE'(021).
LS_FCAT-REF_TABLE = 'CDHDR'(019).
LS_FCAT-INTTYPE = 'C'(003).
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
LS_FCAT-FIELDNAME = 'USERNAME'(018).
LS_FCAT-REF_TABLE = 'CDHDR'(019).
LS_FCAT-INTTYPE = 'C'(003).
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
LS_FCAT-FIELDNAME = 'DDTEXT'(023).
LS_FCAT-REF_TABLE = 'DD04T'(024).
LS_FCAT-INTTYPE = 'C'(003).
LS_FCAT-OUTPUTLEN = '15'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
LS_FCAT-FIELDNAME = 'VALUE_OLD'(029).
LS_FCAT-REF_TABLE = 'CDPOS'(027).
LS_FCAT-INTTYPE = 'C'(003).
LS_FCAT-OUTPUTLEN = '12'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
LS_FCAT-FIELDNAME = 'VALUE_NEW'(026).
LS_FCAT-REF_TABLE = 'CDPOS'(027).
LS_FCAT-INTTYPE = 'C'(003).
LS_FCAT-OUTPUTLEN = '12'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
ENDFORM. " PREPARE_FIELD_CATALOG
*& Form SELECT_PO
Subroutine to select all the Purchase Orders
There are no interface parameters to be passed to this subroutine.
FORM SELECT_PO .
SELECT EBELN " Purchasing Document Number
ERNAM " Name of Person who Created
" the Object
LIFNR " Vendor's account number
EKGRP " Purchasing group
BEDAT " Purchasing Document Date
FROM EKKO
INTO TABLE T_EBELN
WHERE EBELN IN S_EBELN
AND BEDAT IN S_BEDAT.
IF SY-SUBRC NE 0.
MESSAGE S401(M8).
ENDIF. " IF SY-SUBRC NE 0
ENDFORM. " SELECT_PO
*& Form SELECT_OBJ_ID
Subroutine to select Object ID
There are no interface parameters to be passed to this subroutine.
FORM SELECT_OBJ_ID .
IF NOT T_EBELN IS INITIAL.
SELECT OBJECTCLAS " Object Class
OBJECTID " Object value
CHANGENR " Document change number
USERNAME " User name
UDATE " Creation date
FROM CDHDR
INTO TABLE T_CDHDR
FOR ALL ENTRIES IN T_EBELN
WHERE OBJECTID EQ T_EBELN-EBELN
AND UDATE IN S_UDATE
AND TCODE IN ('ME21N','ME22N','ME23N').
IF SY-SUBRC NE 0.
MESSAGE S833(M8) WITH 'Header Not Found'(031).
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_EBELN IS INITIAL
ENDFORM. " SELECT_OBJ_ID
*& Form SELECT_CHANGED_VALUE
Subroutine to select Changed Values
There are no interface parameters to be passed to this subroutine.
FORM SELECT_CHANGED_VALUE .
IF NOT T_CDHDR IS INITIAL.
SELECT OBJECTCLAS " Object class
OBJECTID " Object value
CHANGENR " Document change number
TABNAME " Table Name
FNAME " Field Name
VALUE_NEW " New contents of changed field
VALUE_OLD " Old contents of changed field
FROM CDPOS
INTO TABLE T_CDPOS
FOR ALL ENTRIES IN T_CDHDR
WHERE OBJECTCLAS EQ T_CDHDR-OBJECTCLAS
AND OBJECTID EQ T_CDHDR-OBJECTID
AND CHANGENR EQ T_CDHDR-CHANGENR.
IF SY-SUBRC NE 0.
MESSAGE S833(M8) WITH 'Item Not Found'(032).
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_CDHDR IS INITIAL
ENDFORM. " SELECT_CHANGED_VALUE
*& Form SELECT_PUR_DOC
Subroutine to select Purchase Order Details
There are no interface parameters to be passed to this subroutine.
FORM SELECT_PUR_DOC .
IF NOT T_CDPOS IS INITIAL.
SORT T_EBELN BY EBELN.
LOOP AT T_CDPOS INTO FS_CDPOS.
READ TABLE T_EBELN INTO FS_EBELN WITH KEY EBELN =
FS_CDPOS-OBJECTID BINARY SEARCH.
IF SY-SUBRC NE 0.
DELETE TABLE T_EBELN FROM FS_EBELN.
ENDIF. " IF SY-SUBRC NE 0.
ENDLOOP. " LOOP AT T_CDPOS...
LOOP AT T_EBELN INTO FS_EBELN.
MOVE FS_EBELN-EBELN TO FS_EKKO-EBELN.
MOVE FS_EBELN-ERNAM TO FS_EKKO-ERNAM.
MOVE FS_EBELN-LIFNR TO FS_EKKO-LIFNR.
MOVE FS_EBELN-EKGRP TO FS_EKKO-EKGRP.
MOVE FS_EBELN-BEDAT TO FS_EKKO-BEDAT.
APPEND FS_EKKO TO T_EKKO.
ENDLOOP. " LOOP AT T_EBELN...
ENDIF. " IF NOT T_CDPOS IS INITIAL
ENDFORM. " SELECT_PUR_DOC
*& Form SELECT_VENDOR
Subroutine to select Vendor details
There are no interface parameters to be passed to this subroutine.
FORM SELECT_VENDOR .
IF NOT T_EKKO IS INITIAL.
SELECT LIFNR " Account Number of Vendor or
" Creditor
NAME1 " Name 1
FROM LFA1
INTO TABLE T_LFA1
FOR ALL ENTRIES IN T_EKKO
WHERE LIFNR EQ T_EKKO-LIFNR.
IF SY-SUBRC NE 0.
MESSAGE S002(M8) WITH 'Master Details'(033).
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_EKKO IS INITIAL
ENDFORM. " SELECT_VENDOR
*& Form DESCRIPTION
Subroutine to get the description
There are no interface parameters to be passed to this subroutine.
FORM DESCRIPTION .
IF NOT T_CDPOS IS INITIAL.
SELECT TABNAME " Table Name
FIELDNAME " Field Name
ROLLNAME " Data element
FROM DD03L
INTO TABLE T_DATAELE
FOR ALL ENTRIES IN T_CDPOS
WHERE TABNAME EQ T_CDPOS-TABNAME
AND FIELDNAME EQ T_CDPOS-FNAME.
IF NOT T_DATAELE IS INITIAL.
SELECT ROLLNAME " Data element
DDTEXT " Short Text Describing R/3
" Repository Objects
FROM DD04T
INTO TABLE T_TEXT
FOR ALL ENTRIES IN T_DATAELE
WHERE ROLLNAME EQ T_DATAELE-ROLLNAME
AND DDLANGUAGE EQ 'EN'.
IF SY-SUBRC NE 0.
EXIT.
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_DATAELE IS INITIAL.
ENDIF. " IF NOT T_CDPOS IS INITIAL.
ENDFORM. " DESCRIPTION
*& Form FILL_OUTTAB
Subroutine to populate the Outtab
There are no interface parameters to be passed to this subroutine.
FORM FILL_OUTTAB .
SORT T_CDHDR BY OBJECTID.
SORT T_CDPOS BY OBJECTCLAS OBJECTID CHANGENR.
SORT T_LFA1 BY LIFNR.
SORT T_DATAELE BY TABNAME FIELDNAME.
SORT T_TEXT BY ROLLNAME.
LOOP AT T_EKKO INTO FS_EKKO.
MOVE FS_EKKO-EBELN TO FS_OUTTAB-EBELN.
MOVE FS_EKKO-ERNAM TO FS_OUTTAB-ERNAM.
MOVE FS_EKKO-LIFNR TO FS_OUTTAB-LIFNR.
MOVE FS_EKKO-EKGRP TO FS_OUTTAB-EKGRP.
MOVE FS_EKKO-BEDAT TO FS_OUTTAB-BEDAT.
READ TABLE T_CDHDR INTO FS_CDHDR WITH KEY OBJECTID = FS_EKKO-EBELN
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_CDHDR-USERNAME TO FS_OUTTAB-USERNAME.
MOVE FS_CDHDR-UDATE TO FS_OUTTAB-UDATE.
READ TABLE T_CDPOS INTO FS_CDPOS WITH KEY
OBJECTCLAS = FS_CDHDR-OBJECTCLAS
OBJECTID = FS_CDHDR-OBJECTID
CHANGENR = FS_CDHDR-CHANGENR
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_CDPOS-VALUE_OLD TO FS_OUTTAB-VALUE_OLD.
MOVE FS_CDPOS-VALUE_NEW TO FS_OUTTAB-VALUE_NEW.
READ TABLE T_DATAELE INTO FS_DATAELE WITH KEY
TABNAME = FS_CDPOS-TABNAME
FIELDNAME = FS_CDPOS-FNAME
BINARY SEARCH.
IF SY-SUBRC EQ 0.
READ TABLE T_TEXT INTO FS_TEXT WITH KEY
ROLLNAME = FS_DATAELE-ROLLNAME
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_TEXT-DDTEXT TO FS_OUTTAB-DDTEXT.
ENDIF. " IF SY-SUBRC EQ 0.
ENDIF. " IF SY-SUBRC EQ 0.
ENDIF. " IF SY-SUBRC EQ 0.
ENDIF. " IF SY-SUBRC EQ 0.
READ TABLE T_LFA1 INTO FS_LFA1 WITH KEY LIFNR = FS_EKKO-LIFNR
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_LFA1-NAME1 TO FS_OUTTAB-NAME1.
ENDIF. " IF SY-SUBRC EQ 0.
APPEND FS_OUTTAB TO T_OUTTAB.
ENDLOOP. " LOOP AT T_EKKO...
ENDFORM. " FILL_OUTTAB
*& Form GET_CELL_INFO
Subroutine to get the Cell Information
--> W_VALUE Holds the value of Hotspot clicked
FORM GET_CELL_INFO .
CALL METHOD W_GRID->GET_CURRENT_CELL
IMPORTING
E_ROW =
E_VALUE = W_VALUE
E_COL =
ES_ROW_ID =
ES_COL_ID =
ES_ROW_NO =
ENDFORM. " GET_CELL_INFO
*& Form VALIDATE_PD_NUM
Subroutine to validate Purchase Document Number
There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_PD_NUM .
IF NOT S_EBELN[] IS INITIAL.
SELECT EBELN " Purchase Document Number
FROM EKKO
INTO W_EBELN
UP TO 1 ROWS
WHERE EBELN IN S_EBELN.
ENDSELECT.
IF SY-SUBRC NE 0.
MESSAGE E717(M8).
ENDIF. " IF SY-SUBRC NE 0
ENDIF. " IF NOT S_EBELN[]...
CLEAR SSCRFIELDS-UCOMM.
ENDFORM. " VALIDATE_PD_NUM
*& Form VALIDATE_VEN_NUM
Subroutine to validate Vendor Number
There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_VEN_NUM .
IF NOT S_LIFNR[] IS INITIAL.
SELECT LIFNR " Vendor Number
FROM LFA1
INTO W_LIFNR
UP TO 1 ROWS
WHERE LIFNR IN S_LIFNR.
ENDSELECT.
IF SY-SUBRC NE 0.
MESSAGE E002(M8) WITH W_SPACE.
ENDIF. " IF SY-SUBRC NE 0
ENDIF. " IF NOT S_LIFNR[]...
CLEAR SSCRFIELDS-UCOMM.
ENDFORM. " VALIDATE_VEN_NUM
*& Form VALIDATE_PUR_GRP
Subroutine to validate the Purchase Group
There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_PUR_GRP .
IF NOT S_EKGRP[] IS INITIAL.
SELECT EKGRP " Purchase Group
FROM T024
INTO W_EKGRP
UP TO 1 ROWS
WHERE EKGRP IN S_EKGRP.
ENDSELECT.
IF SY-SUBRC NE 0.
MESSAGE E622(M8) WITH W_SPACE.
ENDIF. " IF SY-SUBRC NE 0
ENDIF. " IF NOT S_EKFRP[]...
CLEAR SSCRFIELDS-UCOMM.
ENDFORM. " VALIDATE_PUR_GRP -
Error while exporting data via Tcode CNS43 by using spreadsheet(XXL) option
Hello All,
User tries to download data to spreadsheet via Tcode CNS43 by using spreadsheet(XXL) option. user gets following error.
Selected key figure STUFE not contained in XXL output structure
Message no. M5180
Diagnosis
You tried to export a key figure that is not contained in the definition of the internal table 'xxl_data'. The key figure, therefore, cannot be exported.
System response
The system ignored the key figure column when exporting.
Procedure
The table definition for 'xxl_data' must be corrected by the development department responsible for the application.
Please note that user doesnt want to use 'save to file' option.
Any help?Refer SAP notes 761839, 522925
Regards -
Creation of BADI's Definition, why?
Hello everyone,
i hope someone can explain to me, why we should create BADI's definition.
This is my point:
BADI's are enhancements, that are available in the Standard SAP, to offer the possibilty of changing/improving the standard code to respond correctly to a company/customer needs. Customer can implement these definitions.
So, even if we create a new BADI definition, this could'n be trigger/active by/in the standard code.
So, the possibility of creating "customer" BADIS definition, is for when you develop a customer program, and you want to create an enhancements in that development?
I associate the BADI's definition to enhancements made by SAP developers in SAP Standard, and badi's implementation to customer developers.
It's like an analogy with SMOD( SAP ) and CMOD (CUSTOMER).
Could somone explain to me, the benefits from creating BADI's definition's from customer point of view?
Thanks for your attention,
PedroHi,
Have a look at below links.
http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
Business add-ins are enhancements to the standard version of the system.
Business Add-In is a new SAP enhancement technique based on ABAP Objects.
They can be inserted into the SAP system based on specific user requirements.
Each Business Add-In has:
at least one Business Add-In definition
a Business Add-In interface
a Business Add-In class that implements the interface
In order to enhance a program, a Business Add-In must first be defined
Subsequently two classes are automatically generated:
An interface with IF_EX_ inserted between the first and second characters of the BADI name.
An adapter class with CL_EX_ inserted between the first and second characters of the BADI name.
The Application developer creates an interface for this Add-In.
There are multiple ways of searching for BADI.
Finding BADI Using CL_EXITHANDLER=>GET_INSTANCE
Finding BADI Using SQL Trace (TCODE-ST05).
Finding BADI Using Repository Information System (TCODE- SE84).
1. Go to the Transaction, for which we want to find the BADI, take the example of Transaction VD02. Click on System->Status. Double click on the program name. Once inside the program search for CL_EXITHANDLER=>GET_INSTANCE.
Make sure the radio button In main program is checked. A list of all the programs with call to the BADIs will be listed.
The export parameter EXIT_NAME for the method GET_INSTANCE of class CL_EXITHANDLER will have the user exit assigned to it. The changing parameter INSTANCE will have the interface assigned to it. Double click on the method to enter the source code.Definition of Instance would give you the Interface name.
2. Start transaction ST05 (Performance Analysis).
Set flag field "Buffer trace"
Remark: We need to trace also the buffer calls, because BADI database tables are buffered. (Especially view V_EXT_IMP and V_EXT_ACT)
Push the button "Activate Trace". Start transaction VA02 in a new GUI session. Go back to the Performance trace session.
Push the button "Deactivate Trace".
Push the button "Display Trace".
The popup screen "Set Restrictions for Displaying Trace" appears.
Now, filter the trace on Objects:
V_EXT_IMP
V_EXT_ACT
Push button "Multiple selections" button behind field Objects
Fill: V_EXT_IMP and V_EXT_ACT
All the interface class names of view V_EXT_IMP start with IF_EX_. This is the standard SAP prefix for BADI class interfaces. The BADI name is after the IF_EX_.
So the BADI name of IF_EX_CUSTOMER_ADD_DATA is CUSTOMER_ADD_DATA
3. Go to Maintain Transaction (TCODE- SE93).
Enter the Transaction VD02 for which you want to find BADI.
Click on the Display push buttons.
Get the Package Name. (Package VS in this case)
Go to TCode: SE84->Enhancements->Business Add-inns->Definition
Enter the Package Name and Execute.
Here you get a list of all the Enhancement BADIs for the given package MB.
For more info have a look at below links:
http://support.sas.com/rnd/papers/sugi30/SAP.ppt
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
http://members.aol.com/_ht_a/skarkada/sap/
http://www.ct-software.com/reportpool_frame.htm
http://www.saphelp.com/SAP_Technical.htm
http://www.kabai.com/abaps/q.htm
http://www.guidancetech.com/people/holland/sap/abap/
http://www.planetsap.com/download_abap_programs.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
/people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
/people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
How to develop BADI
Regards,
Ram -
Create new tab in header using badi ME_GUI_PO_CUST for tcode ME21N
Dear all,
i have implemented method SUBSCRIBE in ME_GUI_PO_CUST to create new tab in ME21N,
but the tab is not coming
following is the code snips, please tell where is the error, or some setting needs to be done
method IF_EX_ME_GUI_PO_CUST~SUBSCRIBE.
DATA: ls_subscriber LIKE LINE OF re_subscribers.
if sy-tcode eq ' ME21N' OR SY-TCODE EQ 'ME22N' OR SY-TCODE EQ 'ME23N'.
CHECK im_application = 'PO'.
CHECK im_element = 'HEADER'.
CLEAR re_subscribers[].
ls_subscriber-name = 'Customer-Data'.
ls_subscriber-dynpro = '0101'.
ls_subscriber-program = 'SAPLMEGUI'.
ls_subscriber-struct_name = 'MEPO_SUBSCRIBERS'.
ls_subscriber-label = 'Customer Data'.
ls_subscriber-position = 10.
ls_subscriber-height = 7.
APPEND ls_subscriber TO re_subscribers.
ENDIF.
endmethod.
Regards
SumodhHi...I hv similar requirement.
I need to show a custom field in the screen for the items.
I tried using the methods "SUBSCRIBE" and "MAP_DYNPRO_FIELDS" as explained in the sample code.
Below is my code. I have copied the sample code and changed it lil.
Method "SUBSCRIBE":
DATA: ls_subscriber LIKE LINE OF re_subscribers.
we want to add a customer subscreen on the item detail tab
CHECK im_application = 'PO'.
CHECK im_element = 'ITEM'.
each line in re_subscribers generates a subscreen. We add one subscreen in this example
CLEAR re_subscribers[].
the name is a unique identifier for the subscreen and defined in this class definition
ls_subscriber-name = subscreen1.
the dynpro number to use
ls_subscriber-dynpro = '9000'.
the program where the dynpro can be found
ls_subscriber-program = 'SAPLZMMPO1'.
each subscreen needs his own DDIC-Structure
ls_subscriber-struct_name = 'ZMM_PO_CUST_SCREEN'.
a label can be defined
ls_subscriber-label = text-t01.
the position within the tabstrib can be defined
ls_subscriber-position = 13.
the height of the screen can be defined here. Currently we suport two screen sizes:
value <= 7 a sevel line subscreen
value > 7 a 16 line subscreen
ls_subscriber-height = 7.
APPEND ls_subscriber TO re_subscribers.
method "MAP_DYNPRO_FIELDS":
FIELD-SYMBOLS: <mapping> LIKE LINE OF ch_mapping.
*- customer fields
CONSTANTS: mmmfd_cust_01 TYPE mmpur_metafield VALUE 90000000.
LOOP AT ch_mapping ASSIGNING <mapping>.
CASE <mapping>-fieldname.
WHEN 'CLMNO'. <mapping>-metafield = mmmfd_cust_01.
ENDCASE.
ENDLOOP.
I created a function group - "ZMMPO1" and created the subscreen 9000 in that. I placed the custom field in that screen. Tha main program of ZMMPO1 is "SAPLZMMPO1".
I created a structure also - "ZMM_PO_CUST_SCREEN".
I want to know whether this is sufficient to display the tab on the screen or am I missing something.
It is mentioned that the implementation of "ME_PROCESS_PO_CUST" is a pre-requisite.
could you lemme know the process please.
Thanks,
Ram. -
File to IDOC, with External Definition to hold multiple IDocs
Hello Experts,
I am configuring a sample File to IDOC scenario. Here are the steps I am following, can you please guide me what I am missing here.
I am having a flat file with 10 records to be transferred to my ECC system through IDOC adapter to create 10 different IDocs.
1. I am picking up my flat file using a 3rd party Business System with File Content Conversion
2. I uploaded CREMAS Idoc and exported as XSD file and modified Occurences paramter to unbounded and uploaded back as an External file definition into IR
3. I defined an SAP WEBAS ABAP type Business System with LS (representing my ECC system) and configured with IDOC Rcvr channel.
4. In the IDOC recvr Channel, I specified RFC destination pointing to my ECC system & Port, Release...etc
5. On the ECC side, I configurated a PARTNER PROFILE with the above mentioned LS(used in step 3) and added an Inbound Idoc paramter CREMAS with process code CRE1. Selected the option Trigger Immediately.
Testing:
1. When I checked my CC monitoring in RWB, my file on the sourced is getting picked up successfull with respect to the specified polling intervals.
2. I don;t see any messages in my SXMB_MONI. I verified SXMB_ADM configuration it looks fine to me
3. I used TCode:WE02 on ECC side, nothing is there
4. I used Tcode SM58 on ECC side, nothign is there
I have no idea what is happening after successfully picking up the file on the source side.
Is there a way to trace where exactly the error is or what is wrong with my scenario?
Just an observation, We don;t need to specifiy any LS on the Sender Business Sytem(3rd party in my case) which picks up my file on the source side. Rather I am specifiying LS on the Target Business Sytem(type WEBAS ABAP in my case) to send my IDOC to ECC system. I am using the same LS to define PP on ECC system.
Edited by: Chris Rock on Oct 21, 2008 5:03 PMAamir,
I tried full cache refresh, also cleared SLD Cache for both IR & ID. No luck.
I think either some thing wrong in connection parameters, but atleast if I see some error in Moni or RWB, it helps, but in my situation, nothing is showing up there.
Connections:
I specified PORT & RFC Dest in IDOC RCVR Adapter along with WEBAS Release version. These PORT & RFCs are created in XI using SM59 & IDX1 and both passed the connection test.
On the ECC side, I created a PP with inbound Idoc CREMAS and process code as CRE1. This PP uses the LS that was used in RCVR BS specified in XI side.
I also loaded Idoc meta data into XI with Tcode: IDX2
Please help me, any body. I will sincerely award the points. -
XI 3.0 and ECC 5.0 IDoc definitions
We use XI 3.0 fo extensive integration with SAP. We recently upgraded from 4.7 ES 2.00 to ECC 5.0. The problem is that all IDoc developments we do now, is recorded as version 640, but XI still thinks the system runs on WAS 620. XI still uses the "old" 620 IDoc definitions missing all the new developments. There is no installed product entry for the new ECC 5.0 in XI. I assume one has to import new application components into XI so that XI is now also aware of ECC 5.0? Is this true and if so, where would we get those new components?
Thanks for the help.Hi Johan,
- if then new IDOCs have new signatures (some new fields) you can import them again in Repository and use the new ones in all mappings/message interfaces etc.
- also try removing old definitions (idoc metadata) in TCODE IDX2 - and upload new
(you don't have to do it because it should upload when you first you the new IDOC type but...
you can try doing it to see if you got the new IDOC definition)
IDX2:
- click Create
- specify idoc type and RFC port to your ecc 5.0
- and check if this is the idoc type taht you want
BTW you specify RFC port for loading idoc metadata in IDX1
- you can also set <b>SAP release</b> parameter in IDOC communication channels
Regards,
michal
Message was edited by: Michal Krawczyk -
BADI enhancement for Enjoy PO Tcodes at "header level".
I could successfully add an item level tab to MEXXN PO tcodes. Somebody help me with the ME_GUI_PO_CUST and ME_PROCESS_PO implementations to add a customer field , say ZZ_ETYP in a separate header level tab "Expense type".
Do I need to add subscreen2 attribute to the implementing class ?
Will one structure do for both header and item level data ?
Do I need to create a separate table ( like ZMEPO_BADI_EXAMPL for items ) for the header also ?
It would be gr8 if i could get the code for the above BADIs and MEPOBADIEX's function modules.Dear Iyer,
Kindly go through the code.. hope this will help you...
<b>DETAILED DATABASE DESIGN SPECIFICATIONS</b>
<b>1. ZTPTP_HEADER</b>
Header: Expense Type
Field Name Field Type Key Information Field Description
MANDT MANDT X Client
EBELN EBELN X Purchasing Document Number
ZZ_EXPTYPE ZZEXPTYPE Expense Type
<b>2. ZTPTP_ITEM</b>
Item: Retainage
Field Name Field Type Key Information Field Description
MANDT MANDT X Client
EBELN EBELN X Purchasing Document Number
EBELP EBELP X Item Number of Purchasing Document
ZZ_RETAINAGE ZZRETAINAGE Retainage
<b>3. ZSPTP_HEADER</b>
PO Enhancement structure: Header
Field Name Field Type Key Information Field Description
EBELN EBELN Purchasing Document Number
ZZ_EXPTYPE ZZEXPTYPE Expense Type
<b>4. ZSPTP_ITEM</b>
PO Enhancement structure: Item
Field Name Field Type Key Information Field Description
EBELN EBELN Purchasing Document Number
EBELP EBELP Item Number of Purchasing Document
ZZ_RETAINAGE ZZRETAINAGE Retainage
Detailed logic
<b>LZPTP_PORETAINAGETOP (TOP INCLUDE) FG: ZPTP_PORETAINAGE</b>
persistent item data
data: git_persistent_data type sorted table of ztptp_item
with unique key mandt ebeln ebelp,
actual item data
git_data type sorted table of ztptp_item
with unique key mandt ebeln ebelp.
persistent header data
data: git_persistent_head type sorted table of ztptp_header
with unique key mandt ebeln ,
actual header data
git_head type sorted table of ztptp_header
with unique key mandt ebeln .
dynpro output structure
tables: zsptp_item,
zsptp_header.
definitions required for dynpro/framework integration
data: ok-code type sy-ucomm.
Following is a SAP include.
include lmeviewsf01.
<b>1. ZPTP_COMMIT_HEADER FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_COMMIT. In this Function module we update the database table ZTPTP_HEADER i.e. as per a change / insert or delete command at the header level. This database tables size will always be low. It just contains the PO s data just being edited or created.
The interface would look like:
TABLES
IMT_DATA_NEWHD STRUCTURE ZTPTP_HEADER
IMT_DATA_OLDHD STRUCTURE ZTPTP_HEADER
Comparing the old and new data we update 3 different internal tables and using these we can update the internal tables ZTPTP_HEADER before actually updating the database table EKKO.A similar logic is coded in the sample FM : MEPOBADIEX_COMMIT
<b>
2. ZPTP_COMMIT_ITEM FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_COMMIT. In this Function module we update the database table ZTPTP_HEADER i.e. as per a change / insert or delete command at the item level. This database tables size will always be low. It just contains the PO s latest data just being edited or created.
The interface would look like :
TABLES
IMT_DATA_NEW STRUCTURE ZTPTP_ITEM
IMT_DATA_OLD STRUCTURE ZTPTP_ITEM
Comparing the old and new data we update 3 different internal tables and using these we can update the internal tables ZTPTP_HEADER before actually updating the database table EKPO. A similar logic is coded in the sample FM : MEPOBADIEX_COMMIT
<b>3. ZPTP_GET_DATA_HEADER FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_GET_DATA. This FM is responsible for updating an internal table (git_head) which would hold the data the user has changed or created or displayed till the current point of time. It would also hold the latest customer header data that is to be displayed in case of a change transaction.
The interface would be as follows:
Local Interface:
IMPORTING
REFERENCE(IM_EBELN) TYPE EBELN
REFERENCE(IM_EBELP) TYPE EBELP OPTIONAL
EXPORTING
REFERENCE(EX_HEAD) TYPE ZTPTP_HEADER
Read expense type from git_header. If not found, get expense value from EKKO.
<b>4. ZPTP_GET_DATA_ITEM FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_GET_DATA. This FM is responsible for updating an internal table (git_data) which would hold the data the user has changed or created or displayed till the current point of time. It would also hold the latest customer item data that is to be displayed in case of a change transaction.
The interface would be as follows:
Local Interface:
IMPORTING
REFERENCE(IM_EBELN) TYPE EBELN
REFERENCE(IM_EBELP) TYPE EBELP
EXPORTING
VALUE(EX_DATA) TYPE ZTPTP_ITEM
Read Retainage from git_data. If not found, get Retainage value from EKPO.
<b>5. ZPTP_INIT FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_INIT. This FM is responsible for clearing the header and item internal tables.
clear: git_persistent_data[], git_data[],git_persistent_head[],git_head[].
<b>6. ZPTP_OPEN FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_OPEN. This FM is responsible for existing information from respective database tables.
The interface would be as follows:
Local Interface:
IMPORTING
REFERENCE(IM_EBELN) TYPE EBELN
Get Expense type and Retainage from customer created Tables and assign it to respective global internal tables.
<b>7. ZPTP_POP_HEADER FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_POP. This FM is responsible for getting header values from screen fields.
The interface would be as follows:
Local Interface:
EXPORTING
REFERENCE(EX_DYNP_DATAHD) TYPE ZSPTP_HEADER
get dynpro data
ex_dynp_datahd = zsptp_header.
<b>8. ZPTP_POP_ITEM FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_POP. This FM is responsible for getting item values from screen fields.
The interface would be as follows:
Local Interface:
EXPORTING
REFERENCE(EX_DYNP_DATA) TYPE ZSPTP_ITEM
get dynpro data
ex_dynp_data = zsptp_item.
<b>9. ZPTP_POST_HEADER FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_POST. This FM is responsible for preparing header data for posting.
Local Interface:
IMPORTING
VALUE(IM_EBELN) TYPE EBELN
prepare customers data for posting
check not im_ebeln is initial.
lit_data_newhd[] = git_head.
lit_data_oldhd[] = git_persistent_head.
lwa_head-mandt = sy-mandt.
lwa_head-ebeln = im_ebeln.
modify lit_data_newhd from lwa_head transporting mandt ebeln where ebeln is initial.
Commit data in Database ztptp_header.
call function 'ZPTP_COMMIT_HEADER'
tables
imt_data_newhd = lit_data_newhd
imt_data_oldhd = lit_data_oldhd.
<b>10. ZPTP_POST_ITEM FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_POST. This FM is responsible for preparing item data for posting.
"Local Interface:
IMPORTING
VALUE(IM_EBELN) TYPE EBELN
data: lwa_data like line of git_data,
lit_data_new type standard table of ztptp_item,
lit_data_old type standard table of ztptp_item.
prepare customers data for posting
check not im_ebeln is initial.
lit_data_new[] = git_data.
lit_data_old[] = git_persistent_data.
lwa_data-mandt = sy-mandt.
lwa_data-ebeln = im_ebeln.
modify lit_data_new from lwa_data transporting mandt ebeln where ebeln is initial.
Commit data in Database ztptp_item.
call function 'ZPTP_COMMIT_ITEM' in update task
tables
imt_data_new = lit_data_new
imt_data_old = lit_data_old.
<b>11. ZPTP_PUSH_HEADER FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_PUSH. This FM is responsible for populating header values to screen fields.
Local Interface:
IMPORTING
REFERENCE(IM_DYNP_DATAHD) TYPE ZSPTP_HEADER
set dynpro data
zsptp_header = im_dynp_datahd .
<b>12. ZPTP_PUSH_ITEM FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_PUSH. This FM is responsible for populating item values to screen fields.
Local Interface:
IMPORTING
REFERENCE(IM_DYNP_DATA) TYPE ZSPTP_ITEM
set dynpro data
zsptp_item = im_dynp_data .
<b>13. ZPTP_SET_DATA_HEADER FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_SET_DATA. This FM is responsible for keep update header information in git_header.
delete a line from git_data
delete table git_head with table key mandt = sy-mandt
ebeln = im_datahd-ebeln.
update customer data
read table git_head assigning <lf_datahd> with table key
mandt = sy-mandt
ebeln = im_datahd-ebeln.
if sy-subrc is initial.
update existing data
<lf_datahd>-zz_exptype = im_datahd-zz_exptype.
else.
make a new entry into the data table
lwa_head = im_datahd.
lwa_head-mandt = sy-mandt.
insert lwa_head into table git_head.
endif.
<b>14. ZPTP_SET_DATA_ITEM FG: ZPTP_PORETAINAGE</b>
Get the sample function module code from the standard FM: MEPOBADIEX_SET_DATA. This FM is responsible for keep update item information in git_data.
delete a line from git_data
delete table git_data with table key mandt = sy-mandt
ebeln = im_data-ebeln
ebelp = im_data-ebelp.
update customer data
read table git_data assigning <lf_data> with table key
mandt = sy-mandt
ebeln = im_data-ebeln
ebelp = im_data-ebelp.
if sy-subrc is initial.
update existing data
<lf_data>-zz_retainage = im_data-zz_retainage.
else.
make a new entry into the data table
lwa_data = im_data.
lwa_data-mandt = sy-mandt.
insert lwa_data into table git_data.
endif.
<b>DETAILED SCREEN DESIGN SPECIFICATIONS</b>
<b>screen 0002</b>
Item Retainage
ZSPTP_ITEM-ZZ_RETAINAGE DEC 5 Retainage
Screen Logic / Process before Output
call method call_view->handle_event( 'PBO' ).
Screen Logic / Process after Input
call method call_view->handle_event( 'PAI' )
<b>Screen 0003</b>
Header: Expense type
ZSPTP_HEADER-ZZ_EXPTYPE NUMC 4 Expense Type
Screen Logic / Process before Output
call method call_view->handle_event( 'PBO' ).
Screen Logic / Process after Input
call method call_view->handle_event( 'PAI' )
<b>DETAILED CLASS DESIGN SPECIFICATIONS</b>
<b>A. ZCL_IM_ME_GUI_PO_CUST</b>
Description
Imp. Class ZME_GUI_PO_CUST
Attributes
Name Level Visibility Type
SUBSCREEN1 Constant Public MEPO_NAME
SUBSCREEN2 Constant Public MEPO_NAME
DYNP_DATA_PBO Instance Attribute Private ZSPTP_ITEM
DYNP_DATA_PAI Instance Attribute Private ZSPTP_ITEM
DYNP_DATA_PBOHD Instance Attribute Private ZSPTP_HEADER
DYNP_DATA_PAIHD Instance Attribute Private ZSPTP_HEADER
Methods
Name Level Visibility
IF_EX_ME_GUI_PO_CUST~SUBSCRIBE Instance Attribute Public
IF_EX_ME_GUI_PO_CUST~MAP_DYNPRO_FIELDS Instance Attribute Public
IF_EX_ME_GUI_PO_CUST~TRANSPORT_FROM_MODEL Instance Attribute Public
IF_EX_ME_GUI_PO_CUST~TRANSPORT_TO_DYNP Instance Attribute Public
IF_EX_ME_GUI_PO_CUST~TRANSPORT_FROM_DYNP Instance Attribute Public
IF_EX_ME_GUI_PO_CUST~TRANSPORT_TO_MODEL Instance Attribute Public
<b>1. SUBSCRIBE</b>
Description
Publisch Customer's Own Screens
Detailed logic
when lc_item.
the name is a unique identifier for the subscreen and defined in this class definition
lwa_subscriber-name = subscreen1.
the dynpro number to use
lwa_subscriber-dynpro = '0002'.
the program where the dynpro can be found
lwa_subscriber-program = 'SAPLZPTP_PORETAINAGE'.
each subscreen needs his own DDIC-Structure
lwa_subscriber-struct_name = 'ZSPTP_ITEM'.
a label can be defined
lwa_subscriber-label = text-001.
the position within the tabstrib can be defined
lwa_subscriber-position = 1.
lwa_subscriber-height = 7.
append lwa_subscriber to re_subscribers.
Header subscreen
when lc_header.
the name is a unique identifier for the subscreen and defined in this class definition
lwa_subscriber-name = subscreen2.
the dynpro number to use
lwa_subscriber-dynpro = '0003'.
the program where the dynpro can be found
lwa_subscriber-program = 'SAPLZPTP_PORETAINAGE'.
each subscreen needs his own DDIC-Structure
lwa_subscriber-struct_name = 'ZSPTP_HEADER'.
a label can be defined
lwa_subscriber-label = text-002.
the position within the tabstrib can be defined
lwa_subscriber-position = 1.
lwa_subscriber-height = 7.
append lwa_subscriber to re_subscribers.
endcase.
<b>2. MAP_DYNPRO_FIELDS</b>
Description
Build Up Field Catalog
Detailed logic
loop at ch_mapping assigning <lf_mapping>.
*Assignment of metafields to the customer fields.
case <lf_mapping>-fieldname.
when 'EBELN'. <lf_mapping>-metafield = mmmfd_preq_no_po.
when 'EBELP'. <lf_mapping>-metafield = mmmfd_preq_item_po.
when 'ZZ_RETAINAGE'. <lf_mapping>-metafield = mmmfd_cust_01.
when 'ZZ_EXPTYPE'. <lf_mapping>-metafield = mmmfd_cust_02.
endcase.
endloop.
<b>
3. TRANSPORT_FROM_MODEL</b>
Description
Data Transport from Business Object
Detailed logic
when subscreen1.
Get the item object
mmpur_dynamic_cast lif_item im_model.
check not lif_item is initial.
lwa_mepoitem = lif_item->get_data( ).
transport customer fields
call function 'ZPTP_GET_DATA_ITEM'
exporting
im_ebeln = lwa_mepoitem-ebeln
im_ebelp = lwa_mepoitem-ebelp
importing
ex_data = lwa_customer.
store info for later use
move-corresponding lwa_mepoitem to dynp_data_pbo.
move lwa_customer-zz_retainage to dynp_data_pbo-zz_retainage.
when subscreen2.
Get the header object
mmpur_dynamic_cast lif_header im_model.
check not lif_header is initial.
transport standard fields
lwa_mepohead = lif_header->get_data( ).
transport customer fields
call function 'ZPTP_GET_DATA_HEADER'
exporting
im_ebeln = lwa_mepohead-ebeln
importing
ex_head = lwa_customerhd.
store info for later use
move-corresponding lwa_mepohead to dynp_data_pbohd.
if not lwa_customerhd-zz_exptype is initial.
move lwa_customerhd-zz_exptype to dynp_data_pbohd-zz_exptype.
else.
move dynp_data_paihd-zz_exptype to dynp_data_pbohd-zz_exptype.
endif.
when others.
endcase.
<b>4. TRANSPORT_TO_DYNP</b>
Description
Data Transport to Screen
Detailed logic
case im_name.
when subscreen1 .
Pushing item data to screen fields
call function 'ZPTP_PUSH_ITEM'
exporting
im_dynp_data = dynp_data_pbo.
when subscreen2 .
Pushing header data to screen fields
call function 'ZPTP_PUSH_HEADER'
exporting
im_dynp_datahd = dynp_data_pbohd.
when others.
endcase.
<b>5. TRANSPORT_FROM_DYNP</b>
Description
Data Transport from Screen
Detailed logic
case im_name.
when subscreen1.
Getting item data from screen fields
call function 'ZPTP_POP_ITEM'
importing
ex_dynp_data = dynp_data_pai.
if dynp_data_pai ne dynp_data_pbo
or dynp_data_paihd ne dynp_data_pbohd.
If data changed we have to notify the framework
to transport data to the model
re_changed = mmpur_yes.
endif.
when subscreen2.
Getting header data from screen fields
call function 'ZPTP_POP_HEADER'
importing
ex_dynp_datahd = dynp_data_paihd.
if dynp_data_paihd ne dynp_data_pbohd
or dynp_data_pai ne dynp_data_pbo.
If data changed we have to notify the framework
to transport data to the model
re_changed = mmpur_yes.
endif.
when others.
endcase.
<b>6. TRANSPORT_TO_MODEL</b>
Description
Treatment of Function Codes
Detailed logic
case im_name.
when subscreen1.
is it an item? im_model can be header or item.
mmpur_dynamic_cast lif_item im_model.
check not lif_item is initial.
lwa_mepoitem = lif_item->get_data( ).
standard fields changed?
if dynp_data_pbo-ebeln ne dynp_data_pai-ebeln or
dynp_data_pbo-ebelp ne dynp_data_pai-ebelp or
dynp_data_pbo-zz_retainage ne dynp_data_pai-zz_retainage.
update standard fields
lwa_mepoitem-ebeln = dynp_data_pai-ebeln.
lwa_mepoitem-ebelp = dynp_data_pai-ebelp.
lwa_mepoitem-zzretainage = dynp_data_pai-zz_retainage.
call method lif_item->set_data( lwa_mepoitem ).
endif.
customer fields changed?
if dynp_data_pbo-zz_retainage ne dynp_data_pai-zz_retainage.
call function 'ZPTP_GET_DATA_ITEM'
exporting
im_ebeln = lwa_mepoitem-ebeln
im_ebelp = lwa_mepoitem-ebelp
importing
ex_data = lwa_customer.
lwa_customer-zz_retainage = dynp_data_pai-zz_retainage.
Commit changes to database.
call function 'ZPTP_SET_DATA_ITEM'
exporting
im_data = lwa_customer.
endif.
when subscreen2.
is it an header? im_model can be header or item.
mmpur_dynamic_cast lif_header im_model.
check not lif_header is initial.
lwa_mepohead = lif_header->get_data( ).
standard fields changed?
if dynp_data_pbohd-ebeln ne dynp_data_paihd-ebeln or
dynp_data_pbohd-zz_exptype ne dynp_data_paihd-zz_exptype.
update standard fields
lwa_mepohead-ebeln = dynp_data_paihd-ebeln.
lwa_mepohead-zzexptype = dynp_data_paihd-zz_exptype.
call method lif_header->set_data( lwa_mepohead ).
endif.
customer fields changed?
if dynp_data_pbohd-zz_exptype ne dynp_data_paihd-zz_exptype.
call function 'ZPTP_GET_DATA_HEADER'
exporting
im_ebeln = lwa_mepohead-ebeln
importing
ex_head = lwa_customerhd.
lwa_customerhd-zz_exptype = dynp_data_paihd-zz_exptype.
Commit changes to database.
call function 'ZPTP_SET_DATA_HEADER'
exporting
im_datahd = lwa_customerhd.
endif.
when others.
endcase.
<b>
B. ZCL_IM_ME_PROCESS_PO_CUST</b>
Description
Imp. Class for BAdI imp. ZME_PROCESS_PO_CUST
Methods
Name Level Visibility
IF_EX_ME_PROCESS_PO_CUST~INITIALIZE Instance Attribute Public
IF_EX_ME_PROCESS_PO_CUST~OPEN Instance Attribute Public
IF_EX_ME_PROCESS_PO_CUST~PROCESS_HEADER Instance Attribute Public
IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM Instance Attribute Public
IF_EX_ME_PROCESS_PO_CUST~POST Instance Attribute Public
IF_EX_ME_PROCESS_PO_CUST~CLOSE Instance Attribute Public
<b>
1. INITIALIZE</b>
Description
Initializations (Invoked Once Only)
Detailed logic
initializations
call function 'ZPTP_INIT'.
<b>2. OPEN</b>
Description
Open a Purchase Order
Detailed logic
data: lwa_mepoheader type mepoheader.
read customer data
this has to be done when we open a persistent object
check im_trtyp eq 'V' or im_trtyp eq 'A'.
lwa_mepoheader = im_header->get_data( ).
read customer data from database
call function 'ZPTP_OPEN'
exporting
im_ebeln = lwa_mepoheader-ebeln.
<b>3. PROCESS_HEADER</b>
Description
Processing of Header Data
Detailed logic
data: lwa_mepohead type mepoheader,
lwa_customerhd type ztptp_header.
include mm_messages_mac. "useful macros for message handling
here we check customers data
lwa_mepohead = im_header->get_data( ).
if lwa_mepohead-loekz eq 'D'.
a physical deletion of the header was carried out.
lwa_customerhd-ebeln = lwa_mepohead-ebeln.
call function 'ZPTP_SET_DATA_HEADER'
exporting
im_datahd = lwa_customerhd
im_physical_delete_request = 'X'.
endif.
<b>4. PROCESS_ITEM</b>
Description
Processing of Item Data
Detailed logic
data: lwa_mepoitem type mepoitem,
lwa_customer type ztptp_item.
include mm_messages_mac. "useful macros for message handling
here we check customers data
lwa_mepoitem = im_item->get_data( ).
if lwa_mepoitem-loekz eq 'D'.
a physical deletion of the item was carried out. therrefor we have to
delete customer data on the level of the item
lwa_customer-ebeln = lwa_mepoitem-ebeln.
lwa_customer-ebelp = lwa_mepoitem-ebelp.
call function 'ZPTP_SET_DATA_ITEM'
exporting
im_data = lwa_customer
im_physical_delete_request = 'X'.
endif.
<b>5. POST</b>
Description
Post
Detailed logic
*Posting header data
call function 'ZPTP_POST_HEADER'
exporting
im_ebeln = im_ebeln.
*Posting item data
call function 'ZPTP_POST_ITEM'
exporting
im_ebeln = im_ebeln.
<b>
6. CLOSE</b>
Description
Closing Processing
Detailed logic
close customer data
call function 'ZPTP_INIT'. -
Hide selection fields in SAP PS Report (TCode:S_ALR_87013533)
Dear Friends,
We are implementing EP. In that i have to take one report of PS which tcode is S_ALR_87013533.
In this report having various selection parameters field in 1st screen.But i want only Project defination field to be displayed and remaing fields i wanted to be hide.
So EP user will put only Project Defination and will acess the ps releated report.
What is the way to hide remaing field in that report.Is their any screen layout avail. for the reporting t codes in customizing.
If any other way is avail. pls let me know.
Thanks & Regards,
Sandeep N.TheurkarDear Hemant,
Firstly thanks for your helpful answer.
I have created new db profile using tcode optx & given selection criteria proj definition.also i have given plan version "0"
But problem is system is showing following error " No costs, revenues or finances were selected".
Pls tell me how to come out from this problem.
Regards,
Sandeep N.Theurkar -
Problem when recording the data using BDC for Tcode CJ02.
Dear Experts,
When i am trying to record the data for TCODE : CJ02 i need to enter the project Definition and enter the WBS element it takes me to the screen then i should select the WBS element and attach a file for that selected WBS element . The option for me to attach the attachment of file will be available on the application area(Services for the Object).
Now the problem when i try to do recording in SHDB this option like create attachement is not visible in the recodring . Kindly suggest me what can i do such that i attach the file for the particular project def and WBS element.
Either suggest any function module or other procedure .......
Regards,
Sana.Hi,
in BDC each and every action is recording. If your press enter in same screen that also recorded once aging may be this is your case repeating field values will appear. we can solve the problem for repeat fields like below.
suppose in your excel having repeated field X1 X2 X3 the X2 contains repeated field X3 means delete the X3 field.
Now In your itab having X1 and X2 fields. While in the LOOP the ITAB pass the X2 field to repeated the fields.
LOOP at ITAB to WA.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_CURSOR'.
bdcdata_wa-fval = 'RM08M-EBELN'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'INVFO-BLDAT'.
bdcdata_wa-fval = wa-X2." 1st time pass the X2 fields
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'INVFO-BLDAT'.
bdcdata_wa-fval = wa-X2." pass the same value to repeated field
APPEND bdcdata_wa TO bdcdata_tab.
Endloop.
Hope you can understand.
Regards,
Dhina..
Maybe you are looking for
-
Process: Safari [213] Path: /Applications/Safari.app/Contents/MacOS/Safari Identifier: com.apple.Safari Version: 5.1 (6534.50) Build Info: WebBrowser-75345000~1 Code Type: X86-64 (Native) Parent Process: la
-
How to import AVCHD from Sony HDR-UX1
Ok, little frustrating getting this to work but here's how it worked for me. First you will need ReadDVD! from http://www.softarch.com/press/readdvdIntel1.htm ($50) This will allow your mac to mount the mini-dvd in your camera. The disk is formatted
-
IPod nano 6th gen (brand new) doesn't recognize when headphones are plugged in
I have a brand new iPod nano (6th gen), and it doesn't detect when headphones are plugged in. I have read that the problem can ocurr because the headphones are not correctly inserted (which is not the case.. i'm absolutely sure about this) or that th
-
Hi I'm getting an application error that i hope someone can help me with. When i try and save a record, i get an application error and the all the description states is a "0". THis does not help me any. Here's a snippet of my code where the it booms
-
I keep recieving an error saying codec overrun when installing latest qt. I tried both auto update and web site update. itcompletes its download an then it fails. help please current app qt 7.1.2