2007 Jul 21 10:22 AM
Hi Guys I ve some issues below i need ans for this!
1) What is Condition Tables KONV KONH what data they store & how to link Konv konh to Vbrk & VBRP
Is it posible.
2) Customer going for update from 4.0b to 4.7 in bdc what r the possiblities of errors?
3) How to update currency field in BDC
4) I want some sample program on nested internal tables with explicit work area
5) data: screen_values type table of dynp_read,
screen_value like line of screen_values.
what is this statement <b>screen_value like line of screen_values</b> pls explain me its work area or onley table pls explain.
Looking for reply guys
Thanks
2007 Jul 21 10:25 AM
Hi,
5) data: screen_values type table of dynp_read,
screen_value like line of screen_values.
what is this statement screen_value like line of screen_values pls explain me its work area or onley table pls explain.
For every internal table there needs be a strcutre, so this strucutre is what in ABAP is called as LINE TYPE.
So when you say LIKE LINE of you are saying that LIKE the STRCUTRE of the internal table.
SO when you say LIKE LINE OF the variable will be a workarea not a table.
Regards,
Sesh
2007 Jul 21 10:29 AM
Hi
KONV, KONH and KONP are the tables which stores the pricing related data of both SD and MM modules
all pricing related data is stored here
You can link the table KONV with VBRK with the KNUMV field
KONV-KNUMV = VBRK-KNUMV and
KONV-KPOSN = VBRP-POSNR.
When going for upgrade from 4.ob to 4.7 you have to see the following:
certain screen fields may change, and field length may change,
certain become mandatory and certain will be removed from the screens
Special care to be taken while uploading Qty and currency fields in BDC
see the following for screen fields
For F4 Values on Screen:
PROCESS ON VALUE_REQUEST
using module call starting with FIELD i.e FIELD field MODULE module
There are number of function modules that can be used for the purpose, but these
can fullfill the task easily or combination of them.
DYNP_VALUE_READ
F4IF_FIELD_VALUE_REQUEST
F4IF_INT_TABLE_VALUE_REQUEST
POPUP_WITH_TABLE_DISPLAY
DYNP_VALUE_READ
This function module is used to read values in the screen fields. Use of this
FM causes forced transfer of data from screen fields to ABAP fields.
There are 3 exporting parameters
DYNAME = program name = SY-CPROG
DYNUMB = Screen number = SY-DYNNR
TRANSLATE_TO_UPPER = 'X'
and one importing TABLE parameter
DYNPFIELDS = Table of TYPE DYNPREAD
The DYNPFIELDS parameter is used to pass internal table of type DYNPREAD
to this FM and the values read from the screen will be stored in this table.This
table consists of two fields:
FIELDNAME : Used to pass the name of screen field for which the value is to
be read.
FIELDVALUE : Used to read the value of the field in the screen.
e.g.
DATA: SCREEN_VALUES TYPE TABLE OF DYNPREAD ,
SCREEN_VALUE LIKE LINE OF SCREEN_VALUES.
SCREEN_VALUE-FIELDNAME = 'KUNNR' . * Field to be read
APPEND SCREEN_VALUE TO SCREEN_VALUES. * Fill the table
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = SY-CPROG
DYNUMB = SY-DYNNR
TRANSLATE_TO_UPPER = 'X'
TABLES
DYNPFIELDS = SCREEN_VALUES.
READ TABLE SCREEN_VALUES INDEX 1 INTO SCREEN_VALUE.Now the screen value for field KUNNR is in the SCREEN_VALUE-FIELDVALUE and can be used for further processing like using it to fill the internal table to be used as parameter in F4IF_INT_TABLE_VALUE_REQUEST ETC.
F4IF_FIELD_VALUE_REQUEST
This FM is used to display value help or input from ABAP dictionary.We have to pass the name of the structure or table(TABNAME) along with the field name(FIELDNAME) . The selection can be returned to the specified screen field if three
parameters DYNPNR,DYNPPROG,DYNPROFIELD are also specified or to a table if RETRN_TAB is specified.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
TABNAME = table/structure
FIELDNAME = 'field name'
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNR
DYNPROFIELD = 'screen field'
IMPORTING
RETURN_TAB = table of type DYNPREAD
.
F4IF_INT_TABLE_VALUE_REQUEST
This FM is used to dsiplay values stored in an internal table as input
help.This FM is used to program our own custom help if no such input help
exists in ABAP dictionary for a particular field. The parameter VALUE_TAB is used to pass the internal table containing input values.The parameter RETFIELD
is used to specify the internal table field whose value will be returned to the screen field or RETURN_TAB.
If DYNPNR,DYNPPROG and DYNPROFIELD are specified than the user selection is passed to the screen field specified in the DYNPROFIELD. If RETURN_TAB is specified the selectionis returned in a table.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = field from int table whose value will be returned
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
DYNPROFIELD = 'screen field'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = internal table whose values will be shown.
RETURN_TAB = internal table of type DDSHRETVAL
EXCEPTIONS
parameter_error = 1
no_values_found = 2
others = 3.
POPUP_WITH_TABLE_DISPLAY
This FM is used to display the contents of an internal table in a popup window.The user can select a row and the index of that is returned in the CHOISE
parameter.The VALUETAB is used to pass the internal table.
A suitable title can be set using TITLETEXT parameter. The starting and end position of the popup can be specified by the parameters STARTPOS_COL / ROW and ENDPOS_ROW / COL .
CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
EXPORTING
ENDPOS_COL =
ENDPOS_ROW =
STARTPOS_COL =
STARTPOS_ROW =
TITLETEXT = 'title text'
IMPORTING
CHOISE =
TABLES
VALUETAB =
EXCEPTIONS
BREAK_OFF = 1
OTHERS = 2.
e.g.
DATA: w_choice TYPE SY-TABIX.
DATA: BEGIN OF i_values OCCURS 0 WITH HEADER LINE,
values TYPE I,
END OF i_values.
PARAMETRS : id TYPE I.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR id
i_values-values = '0001'.
APPEND i_values.
i_values-values = '0002'.
APPEND i_values.
i_values-values = '0003'.
APPEND i_values.
i_values-values = '0004'.
APPEND i_values.
CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
EXPORTING
ENDPOS_COL = 40
ENDPOS_ROW = 12
STARTPOS_COL = 20
STARTPOS_ROW = 5
TITLETEXT = 'Select an ID'
IMPORTING
CHOISE = w_choice
TABLES
VALUETAB = i_values
EXCEPTIONS
BREAK_OFF = 1
OTHERS = 2.
CHECK w_choice > 0.
READ TABLE i_values INDEX w_choice....now we can process the selection as it is contained
...in the structure i_values.
Other FM that may be used to provide input help is HELP_START .
<b>Reward points for useful Answers</b>
Regards
Anji
2007 Jul 21 10:49 AM
Hi
A <b>condition table</b> defines the combination of fields (the key) that identifies an individual condition record. A condition record is how the system stores the specific condition data that you enter in the system as condition records. For example, when you enter the price for a product or a special discount for a good customer, you create individual condition records.
KONH -->Conditions header
KONP-->Conditions items
KONV-->Procedure ( billing doc or sales order)
Check these links for tables
http://www.erpgenie.com/abap/tables_system.htm
http://goldenink.com/abap/files_in_sap.html
http://www.sapdevelopment.co.uk/tables/tables.htm
http://www.sap-topjobs.com/SAPTABLEREF%5B1%5D.doc
It will be KNUMH, VBELN, POSNR
<b><u>Nested Internal Table</u></b>
DATA: SUM TYPE I, CNT TYPE I.
NODES: SPFLI, SFLIGHT, SBOOK.
DATA: BEGIN OF WA_SBOOK,
BOOKID TYPE SBOOK-BOOKID,
SMOKER TYPE SBOOK-SMOKER,
CLASS TYPE SBOOK-CLASS,
LUGGWEIGHT TYPE SBOOK-LUGGWEIGHT,
WUNIT TYPE SBOOK-WUNIT,
END OF WA_SBOOK.
DATA: BEGIN OF WA_SFLIGHT,
FLDATE TYPE SFLIGHT-FLDATE,
SBOOK LIKE TABLE OF WA_SBOOK ,
END OF WA_SFLIGHT.
DATA: BEGIN OF WA_SPFLI,
CARRID TYPE SPFLI-CARRID,
CONNID TYPE SPFLI-CONNID,
CITYFROM TYPE SPFLI-CITYFROM,
CITYTO TYPE SPFLI-CITYTO,
SFLIGHT LIKE TABLE OF WA_SFLIGHT ,
END OF WA_SPFLI.
DATA TAB_SPFLI LIKE TABLE OF WA_SPFLI .
START-OF-SELECTION.
GET SPFLI.
REFRESH WA_SPFLI-SFLIGHT.
GET SFLIGHT.
REFRESH WA_SFLIGHT-SBOOK.
GET SBOOK.
MOVE-CORRESPONDING SBOOK TO WA_SBOOK.
APPEND WA_SBOOK TO WA_SFLIGHT-SBOOK.
GET SFLIGHT LATE.
MOVE-CORRESPONDING SFLIGHT TO WA_SFLIGHT.
APPEND WA_SFLIGHT TO WA_SPFLI-SFLIGHT.
GET SPFLI LATE.
MOVE-CORRESPONDING SPFLI TO WA_SPFLI.
APPEND WA_SPFLI TO TAB_SPFLI.
END-OF-SELECTION.
SORT TAB_SPFLI BY CITYFROM CITYTO CONNID.
LOOP AT TAB_SPFLI INTO WA_SPFLI.
SKIP.
WRITE: / WA_SPFLI-CARRID,
WA_SPFLI-CONNID,
'from', (15) WA_SPFLI-CITYFROM,
'to', (15) WA_SPFLI-CITYTO.
ULINE.
SORT WA_SPFLI-SFLIGHT BY FLDATE.
LOOP AT WA_SPFLI-SFLIGHT INTO WA_SFLIGHT.
SKIP.
WRITE: / 'Date:', WA_SFLIGHT-FLDATE.
WRITE: 20 'Book-ID', 40 'Smoker', 50 'Class'.
ULINE.
SORT WA_SFLIGHT-SBOOK BY CLASS SMOKER BOOKID.
SUM = 0.
CNT = 0.
LOOP AT WA_SFLIGHT-SBOOK INTO WA_SBOOK.
WRITE: / WA_SBOOK-BOOKID UNDER 'Book-ID',
WA_SBOOK-SMOKER UNDER 'Smoker',
WA_SBOOK-CLASS UNDER 'Class'.
SUM = SUM + WA_SBOOK-LUGGWEIGHT.
CNT = CNT + 1.
ENDLOOP.
ULINE.
WRITE: 'Number of bookings: ', (3) CNT,
/ 'Total luggage weight:',
(3) SUM, WA_SBOOK-WUNIT.
ENDLOOP.
ENDLOOP.
PROCESS ON VALUE_REQUEST
using module call starting with FIELD i.e FIELD field MODULE module
There are number of function modules that can be used for the purpose, but these
can fullfill the task easily or combination of them.
DYNP_VALUE_READ
F4IF_FIELD_VALUE_REQUEST
F4IF_INT_TABLE_VALUE_REQUEST
POPUP_WITH_TABLE_DISPLAY
DYNP_VALUE_READ
This function module is used to read values in the screen fields. Use of this
FM causes forced transfer of data from screen fields to ABAP fields.
There are 3 exporting parameters
DYNAME = program name = SY-CPROG
DYNUMB = Screen number = SY-DYNNR
TRANSLATE_TO_UPPER = 'X'
and one importing TABLE parameter
DYNPFIELDS = Table of TYPE DYNPREAD
The<b> DYNPFIELDS</b> parameter is used to pass internal table of type DYNPREAD
to this FM and the values read from the screen will be stored in this table.This
table consists of two fields:
<b><u>FIELDNAME :</u></b> Used to pass the name of screen field for which the value is to
be read.
<u><b>FIELDVALUE :</b></u> Used to read the value of the field in the screen.
DATA: SCREEN_VALUES TYPE TABLE OF DYNPREAD ,
SCREEN_VALUE LIKE LINE OF SCREEN_VALUES.
SCREEN_VALUE-FIELDNAME = 'KUNNR' . * Field to be read
APPEND SCREEN_VALUE TO SCREEN_VALUES. * Fill the table
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = SY-CPROG
DYNUMB = SY-DYNNR
TRANSLATE_TO_UPPER = 'X'
TABLES
DYNPFIELDS = SCREEN_VALUES.
READ TABLE SCREEN_VALUES INDEX 1 INTO SCREEN_VALUE
Now the screen value for field KUNNR is in the SCREEN_VALUE-FIELDVALUE and can be used for further processing like using it to fill the internal table to be used as parameter in F4IF_INT_TABLE_VALUE_REQUEST ETC.
<u><b>F4IF_FIELD_VALUE_REQUEST</b></u>
This FM is used to display value help or input from ABAP dictionary.We have to pass the name of the structure or table(TABNAME) along with the field name(FIELDNAME) . The selection can be returned to the specified screen field if three
parameters DYNPNR,DYNPPROG,DYNPROFIELD are also specified or to a table if <b>RETRN_TAB</b> is specified.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
TABNAME = table/structure
FIELDNAME = 'field name'
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNR
DYNPROFIELD = 'screen field'
IMPORTING
RETURN_TAB = table of type DYNPREAD
.
<u><b>F4IF_INT_TABLE_VALUE_REQUEST</b></u>
This FM is used to dsiplay values stored in an internal table as input
help.This FM is used to program our own custom help if no such input help
exists in ABAP dictionary for a particular field. The parameter VALUE_TAB is used to pass the internal table containing input values.The parameter RETFIELD
is used to specify the internal table field whose value will be returned to the screen field or RETURN_TAB.
If DYNPNR,DYNPPROG and DYNPROFIELD are specified than the user selection is passed to the screen field specified in the DYNPROFIELD. If RETURN_TAB is specified the selectionis returned in a table.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = field from int table whose value will be returned
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
DYNPROFIELD = 'screen field'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = internal table whose values will be shown.
RETURN_TAB = internal table of type DDSHRETVAL
EXCEPTIONS
parameter_error = 1
no_values_found = 2
others = 3.
<u><b>POPUP_WITH_TABLE_DISPLAY</b></u>
This FM is used to display the contents of an internal table in a popup window.The user can select a row and the index of that is returned in the CHOISE
parameter.The VALUETAB is used to pass the internal table.
A suitable title can be set using TITLETEXT parameter. The starting and end position of the popup can be specified by the parameters STARTPOS_COL / ROW and ENDPOS_ROW / COL .
CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
EXPORTING
ENDPOS_COL =
ENDPOS_ROW =
STARTPOS_COL =
STARTPOS_ROW =
TITLETEXT = 'title text'
IMPORTING
CHOISE =
TABLES
VALUETAB =
EXCEPTIONS
BREAK_OFF = 1
OTHERS = 2.
<b>e.g.</b>
DATA: w_choice TYPE SY-TABIX.
DATA: BEGIN OF i_values OCCURS 0 WITH HEADER LINE,
values TYPE I,
END OF i_values.
PARAMETRS : id TYPE I.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR id
i_values-values = '0001'.
APPEND i_values.
i_values-values = '0002'.
APPEND i_values.
i_values-values = '0003'.
APPEND i_values.
i_values-values = '0004'.
APPEND i_values.
CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
EXPORTING
ENDPOS_COL = 40
ENDPOS_ROW = 12
STARTPOS_COL = 20
STARTPOS_ROW = 5
TITLETEXT = 'Select an ID'
IMPORTING
CHOISE = w_choice
TABLES
VALUETAB = i_values
EXCEPTIONS
BREAK_OFF = 1
OTHERS = 2.
CHECK w_choice > 0.
READ TABLE i_values INDEX w_choice....
now we can process the selection as it is contained
...in the structure i_values.
Other FM that may be used to provide input help is HELP_START .
<b>for CREATING SEARCH HELP</b>
1) Elementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).
2) Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths.
3)An elementary search help defines the standard flow of an input help.
4) A collective search help combines several elementary search helps. The user can thus choose one of several alternative search paths with a collective search help.
5)A collective search help comprises several elementary search helps. It combines all the search paths that are meaningful for a field.
6)Both elementary search helps and other search helps can be included in a collective search help. If other collective search helps are contained in a collective search help, they are expanded to the level of the elementary search helps when the input help is called.
<u><b>CREATION:</b></u>
Go to SE11 Tcode
select search help
give the 'z' search help name and create
select the selection method ur table name eg : 'mara'
dialog module 'display value immediately'.
add the field whatever u want and lpos = 1 and spos = 1 and check import and export parameter.
where left position when displaying and spos = search position
and then save and activate ..
<b>See the links:</b>
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee38446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee45446011d189700000e8322d00/content.htm
https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=2176485
https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=3601619
<b>pls go through this for search help creation</b>
http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
<u><b>Search Help Exits:</b></u>
Reward all helpfull answers
Regards
Pavan