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: 

Retrieve hard currency figures from SKC1A

Former Member
0 Kudos

Hi,

I have an issue that has been bothering me for a while. I need to be able to get hard currency figures from SKC1A. I am using logical database SDF, with no variant of the selection screen. For functionality reasons, I have added the currency key field (CURTP) as a SELECT-OPTION to the selection screen. To get data from SKC1A I use

Get skc1a.
CHECK SELECT-OPTIONS.

In addition to this, I am trying to manipulate the SD_CURTP parameter that seems to control the currency key selection like this:

SD_CURTP = s_curtp. " s_curtp is the SELECT-OPTION value.

So my code looks like this:


SD_CURTP = s_curtp. " s_curtp is the SELECT-OPTION value.
Get skc1a.
CHECK SELECT-OPTIONS.

I have successfully managed to do the same manipulation with SD_STIDA previously (however, not in this program), so I do not understand why it should not work in the same way with SD_CURTP.

However, this seems to have no effect on the currency type that is returned from SKC1A. When I select local currency in the selection field (in our config that value is '10'), I get the correct figures, but when I select hard currency (40), I get only 0's. It seems to be that no records are returned from get Get statement into my internal table storing the result.

Does anyone have any bright ideas on how to get the hard currency figures from SKC1A?

Help is greatly appreciated!

Regards,

Thomas

Message was edited by: Thomas Kjelsrud

Message was edited by: Thomas Kjelsrud

2 REPLIES 2

andreas_mann3
Active Contributor
0 Kudos

hi,

try: <b>fm READ_SKC1C</b>

A.

0 Kudos

Hi Andreas.

You mean like this?

CALL FUNCTION 'READ_SKC1C'

EXPORTING

xbukrs = SD_BUKRS[]

xgjahr = sd_gjahr

  • xgsber =

xrtcur = s_curtp-low

xsaknr = SD_SAKNR[]

IMPORTING

XSKC1C = i_incoming "internal table to store result

EXCEPTIONS

KEY_INCOMPLETE = 1

NOT_AUTHORIZED = 2

NOT_FOUND = 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.