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: 

MIRO-Validation while parking document

Former Member
0 Kudos

Dear Expert,

I have a specific requirement while validating MIRO document while parking (posting no issue control is in place) , implemented a BADI name = 'INVOICE_UPDATE'  , method = 'CHANGE_AT_SAVE' ; following is the ABAP code in order to get multiline PO references for further manupulating for required validation.

METHOD if_ex_invoice_update~change_at_save.
  DATA: lv_drseg(15) TYPE c VALUE '(SAPLMR1M)DRSEG'.
  FIELD-SYMBOLS: <fs_drseg> TYPE ANY TABLE.
  ASSIGN (lv_drseg) TO <fs_drseg>.
  IF <fs_drseg> IS ASSIGNED.
    BREAK-POINT.
  ENDIF.
ENDMETHOD.

I am getting a runtime error =  'ASSIGN_TYPE_CONFLICT', at line ASSIGN (lv_drseg) TO <fs_drseg>.

please guide how i am able to extract data from multiline for further analysis or is there any other solution to validate multiline during parking MIRO document.

1 ACCEPTED SOLUTION

Aashish28
Contributor
0 Kudos

Hii,

       Why are you use field symbol assign reference of DRSEG to get multiline PO references instead of that you can use internal table TI_RSEG_NEW (Import Parameter) which contain your po line item put your logic (ex. loop or any) , for more detail put break point and see in debugger local variables -

10 REPLIES 10

gouravkumar64
Active Contributor
0 Kudos

Hi,

Replace type any table with type any.

look AT this for help.

http://scn.sap.com/thread/73404

Thanks

Gourav.

0 Kudos

Dear Gaurav,

Thanks !

I have corrected code as instructed, but problem not yet resolved.

I am getting an error at line code "

DATA : itab TYPE TABLE OF drseg WITH HEADER LINE."

and not able to compile

Error message.

"Class Method IF_EX_INVOICE_UPDATE~CHANGE_AT_SAVE

Tables with headers are no longer supported in the OO context. "

Then I tried with a statement

"DATA : itab TYPE TABLE OF drseg INITIAL SIZE 0" ; code get compiled but throws a runtime dump  GETWA_NOT_ASSIGNED - Field symbol has not yet been assigned.

0 Kudos

Hi,

Can you attach your dump details from ST22.

Regard's

Smruti

0 Kudos

Hi,

For ur OO context error look at this.

in OOPS ABAP,internal table with header area is obsolete.

http://scn.sap.com/thread/1025637

see what sap help said  SOLUTION for this !!!

http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb36a1358411d1829f0000e829fbfe/content.htm

Thanks

Gourav.

Aashish28
Contributor
0 Kudos

Hii,

       Why are you use field symbol assign reference of DRSEG to get multiline PO references instead of that you can use internal table TI_RSEG_NEW (Import Parameter) which contain your po line item put your logic (ex. loop or any) , for more detail put break point and see in debugger local variables -

Former Member
0 Kudos

Thanks Ashish,  Surely I could have used this but TI_RSEG_NEW table does not show any records.

0 Kudos

Hiii,

         I don't know why data is not populating it may be due to other reason , but you can also use  or

DATA: lv_drseg(20) TYPE c VALUE '(SAPLMR1M)YDRSEG[]'.


DATA: lv_drseg(20) TYPE c VALUE '(SAPLMR1M)T_DRSEG[]'.


Former Member
0 Kudos

Thanks Ashish.

Problem resolved after using YDRSEG

0 Kudos

Hi,

Good news.

So close this thread.

Thanks

Gourav.

Former Member
0 Kudos

Hi

Are you sure that the parameter (SAPLMR1M)DRSEG does exist and getting filled in program SAPLMR1M. I could see other table parameters like t_drseg, ydrseg, i drseg getting filled in program.

So probably it could be one of the parameters you need to get visibility by field symbols w.r.to structure

mmcr_drceg.

Try writing a logic as mentioned below and see if you are getting the error to understand the issue better.

DATA: lv_drseg(20) TYPE c VALUE '(SAPLMR1M)T_DRSEG'.

  FIELD-SYMBOLS: <fs_drseg> TYPE ANY.

  ASSIGN (lv_drseg) TO <fs_drseg>.

  IF <fs_drseg> IS ASSIGNED.

    BREAK-POINT.

  ENDIF.

br...

Dwaraka.