Application Development and Automation 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: 
Read only

L_TO_CREATE_POSTING_CHANGE

Former Member
0 Likes
2,873

Hi there,

Does anyone who experiences in using this function module "L_TO_CREATE_POSTING_CHANGE"? I think it can function as the "LT05". However, I can't successfully execute it via SE37. I always get the exception "QUANT_NOT_SELECTALBE" and the message "Quant cannot have a posting change". Does anyone knows why? And could anyone who can guide me how to successfully execute this function module.

Thanks in advanced.

Sincerely Yours

Tom

Hi there,

Does anyone who experiences in using this function module "L_TO_CREATE_POSTING_CHANGE"? I think it can function as the "LT05". However, I can't successfully execute it via SE37. I always get the exception "QUANT_NOT_SELECTALBE" and the message "Quant cannot have a posting change". Does anyone knows why? And could anyone who can guide me how to successfully execute this function module.

Thanks in advanced.

Sincerely Yours

Tom

2 REPLIES 2
Read only

former_member183804
Active Contributor
0 Likes
1,214

Sounds like it needs certain actual parameters. Maybe setting a break-point in the Fuba and exceuting the transaction might be helpful

Best Regards

Klaus

Read only

Former Member
0 Likes
1,214

Hi,

Try the following code:

DATA: l_ubnum TYPE ubnum,

l_tanum TYPE tanum.

DATA: i_lqua TYPE STANDARD TABLE OF lqua INITIAL SIZE 0

WITH HEADER LINE.

DATA: l_tanum TYPE tanum,

l_i_lubqu TYPE STANDARD TABLE OF lubqu INITIAL SIZE 0,

rec_lubqu TYPE lubqu.

  • Get posting change number details

SELECT ubnum INTO l_ubnum

FROM lubu

UP TO 1 ROWS

WHERE mblnr = v_docno

AND mjahr = v_docyr.

ENDSELECT.

rec_lubqu-lqnum = i_lqua-lqnum.

rec_lubqu-menge = i_lqua-verme.

APPEND rec_lubqu TO l_i_lubqu.

WAIT UP TO 5 SECONDS.

  • Function module to Post the material document

CALL FUNCTION 'L_TO_CREATE_POSTING_CHANGE'

EXPORTING

i_lgnum = i_lqua-lgnum

i_ubnum = l_ubnum

i_squit = c_x

i_nidru = c_x

i_update_task = space

i_commit_work = c_x

i_bname = sy-uname

IMPORTING

e_tanum = l_tanum

TABLES

t_lubqu = l_i_lubqu

EXCEPTIONS

foreign_lock = 1

tp_completed = 2

xfeld_wrong = 3

ldest_wrong = 4

drukz_wrong = 5

tp_wrong = 6

squit_forbidden = 7

no_to_created = 8

update_without_commit = 9

no_authority = 10

i_ubnum_or_i_lubu = 11

bwlvs_wrong = 12

material_not_found = 13

manual_to_forbidden = 14

bestq_wrong = 15

sobkz_missing = 16

sobkz_wrong = 17

meins_wrong = 18

conversion_not_found = 19

no_quants = 20

t_lubqu_required = 21

le_bulk_quant_not_selectable = 22

quant_not_selectable = 23

quantnumber_initial = 24

kzuap_or_bin_location = 25

date_wrong = 26

nltyp_missing = 27

nlpla_missing = 28

lgber_wrong = 29

lenum_wrong = 30

menge_wrong = 31

menge_to_big = 32

open_tr_kzuap = 33

lock_exists = 34

double_quant = 35

quantity_wrong = 36

error_message = 99

OTHERS = 37.

regards

Aveek