2008 Jan 29 8:59 AM
HI,
I HAVE WRITTEN THIS CODE, BUT FOR THE FIELD DMBTR IM NOT ABLE TO INPUT VALUE,I THINK FOR CURRENCY FEILD ITS NOT ALLOWING FIELD, BUT I NEED A AMOUNT FIELD FOR INPUT. SO HOW TO DO IT?
DATA: LIT_FIELDS LIKE SVAL OCCURS 0 WITH HEADER LINE.
DATA: LC_KURSF(10) TYPE C.
LIT_FIELDS-TABNAME = 'BSEG'.
LIT_FIELDS-FIELDNAME = 'VBELN'.
APPEND LIT_FIELDS.
LIT_FIELDS-TABNAME = 'BKPF'.
LIT_FIELDS-FIELDNAME = 'KURSF'.
APPEND LIT_FIELDS.
LIT_FIELDS-TABNAME = 'BSEG'.
LIT_FIELDS-FIELDNAME = 'DMBTR'.
APPEND LIT_FIELDS.
CALL FUNCTION 'POPUP_GET_VALUES'
EXPORTING
POPUP_TITLE = 'Enter Details'
START_COLUMN = '50'
START_ROW = '05'
* IMPORTING
* RETURNCODE =
TABLES
FIELDS = LIT_FIELDS
EXCEPTIONS
ERROR_IN_FIELDS = 2
OTHERS = 3 .
CLEAR: LC_KURSF.
2008 Jan 29 9:14 AM
Hi,
I think it will allow the currency field once u add the field for unit of currency.
Regards,
Rajesh Akarte
2008 Jan 29 9:26 AM
But Im using DMBTR so Its defined INR , If i use DMBE2 then its USD defined here....
2008 Jan 29 9:44 AM
hi,
you have to add the following lines as well:
lit_fields-tabname = 'T001'.
lit_fields-fieldname = 'WAERS'.
APPEND lit_fields.
if you want a specific currency, than pls. also add (before the APPEND):
lit_fields-value = 'INR'.
lit_fields-field_attr = '02'.
hope this helps
ec
2008 Jan 29 9:44 AM
hi
i am watching this forum
i tried some RnD in this but was of no help
by the way if you find the solution to ypur problem kindly update the forum with the solution, its a very interresting issue
thank you
2008 Jan 29 9:49 AM
wow it worked
but i am unable to figure out how
i know that you used currency type for curency field to be active
then why dont we need it in while adding vlues in thje table
i tried to add values in BSEG without using currency type
and it was perfect
kindly help me out
2008 Jan 29 10:36 AM
2008 Jan 29 10:01 AM
2008 Jan 29 10:12 AM
Hi,
Eric Cartman
AFTER ADDING
LIT_FIELDS-TABNAME = 'T001'.
LIT_FIELDS-FIELDNAME = 'WAERS'.
ITS ALLOWING TO INPUT VALUE BUT IN THE INTER TABLE ITS NOT TAKING THE VALUE ENTERED FOR DMBTR....NOW WHAT MIGHT BE THE PROBLEM???
2008 Jan 29 10:13 AM
2008 Jan 29 10:46 AM
From the documentation of FM - 'POPUP_GET_VALUES'
"If a currency field (type CURR) is specified, then the field assigned in the ABAP Dictionary for the currency key (type CUKY) must also be specified. The display of the currency key field can be suppressed (if filled initially)."
The modified code (working)
DATA: LIT_FIELDS LIKE SVAL OCCURS 0 WITH HEADER LINE.
DATA: LC_KURSF(10) TYPE C.
LIT_FIELDS-TABNAME = 'BSEG'.
LIT_FIELDS-FIELDNAME = 'VBELN'.
APPEND LIT_FIELDS.
CLEAR LIT_FIELDS.
LIT_FIELDS-TABNAME = 'BKPF'.
LIT_FIELDS-FIELDNAME = 'KURSF'.
APPEND LIT_FIELDS.
CLEAR LIT_FIELDS.
LIT_FIELDS-TABNAME = 'BSEG'.
LIT_FIELDS-FIELDNAME = 'DMBTR'.
APPEND LIT_FIELDS.
CLEAR LIT_FIELDS.
LIT_FIELDS-TABNAME = 'T001'.
LIT_FIELDS-FIELDNAME = 'WAERS'.
LIT_FIELDS-VALUE = 'INR'.
LIT_FIELDS-FIELD_ATTR = '04'.
APPEND LIT_FIELDS.
CALL FUNCTION 'POPUP_GET_VALUES'
EXPORTING
POPUP_TITLE = 'Enter Details'
START_COLUMN = '50'
START_ROW = '05'
IMPORTING
RETURNCODE =
TABLES
FIELDS = LIT_FIELDS
EXCEPTIONS
ERROR_IN_FIELDS = 2
OTHERS = 3 .
2008 Jan 29 11:02 AM
Dear,
SDN POWERED
I have put a break point on READ TABLE LIT_FIELDS . to see what r the values its taking,
there i cant find value for DMBTR??? So how its working???
2008 Jan 29 11:46 AM
2008 Jan 29 1:43 PM
2008 Jan 29 4:12 PM
hi Kaushik,
the data is there... the trick is that the value field is 132 long, and these kind of data (KURSF and DMBTR) are right aligned, just do like this after the FM call:
LOOP AT lit_fields.
SHIFT lit_field-value LEFT DELETING LEADING space.
MODIFY lit_field TRANSPORTING value.
WRITE : / lit_field-value.
ENDLOOP.
ec
2008 Jan 30 5:39 AM
2008 Jan 30 5:39 AM