Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

HOW TO SOLVE THIS????

former_member198275
Active Contributor
0 Kudos
434

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.

16 REPLIES 16

rajesh_akarte2
Active Participant
0 Kudos
172

Hi,

I think it will allow the currency field once u add the field for unit of currency.

Regards,

Rajesh Akarte

former_member198275
Active Contributor
0 Kudos
172

But Im using DMBTR so Its defined INR , If i use DMBE2 then its USD defined here....

0 Kudos
172

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

0 Kudos
172

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

0 Kudos
172

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

0 Kudos
172

Hi Sumesh Nair

any new progress?????

former_member198275
Active Contributor
0 Kudos
172

THNAKS Eric Cartman .

former_member198275
Active Contributor
0 Kudos
172

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???

former_member198275
Active Contributor
0 Kudos
172

TILL TO SOLVE FULLY

Former Member
0 Kudos
172

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 .

0 Kudos
172

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???

former_member198275
Active Contributor
0 Kudos
172

Any expert Suggestion ?

0 Kudos
172

can any one help???

0 Kudos
172

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

0 Kudos
172

Thanks a lot. Solved.

0 Kudos
172

Thanks a lot. Solved.